]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Hero.cpp
store complete entity in hero
[l2e.git] / src / common / Hero.cpp
index 98b92ca2fdafbbef48bad6fa86216060b380bc75..1d276e5117aa1e230200607230c9cbb60d0cfccd 100644 (file)
@@ -35,9 +35,7 @@ Hero::Hero()
 , battleSprite(0)
 , meleeAnimation(0)
 , attackAnimation(0)
-, spellAnimation(0)
-
-, mapSprite(0) {
+, spellAnimation(0) {
 
 }
 
@@ -61,6 +59,7 @@ void Hero::CreateTypeDescription() {
        Hero h;
 
        int animationId(TypeDescription::GetTypeId("Animation"));
+       int entityId(TypeDescription::GetTypeId("Entity"));
        int numberId(TypeDescription::GetTypeId("Number"));
        int spriteId(TypeDescription::GetTypeId("Sprite"));
        int statsId(TypeDescription::GetTypeId("Stats"));
@@ -87,7 +86,7 @@ void Hero::CreateTypeDescription() {
        td.AddField("spellAnimation", FieldDescription(((char *)&h.spellAnimation) - ((char *)&h), animationId, true));
        td.AddField("meleeAnimation", FieldDescription(((char *)&h.meleeAnimation) - ((char *)&h), animationId, true));
 
-       td.AddField("mapSprite", FieldDescription(((char *)&h.mapSprite) - ((char *)&h), spriteId, true));
+       td.AddField("mapEntity", FieldDescription(((char *)&h.mapEntity) - ((char *)&h), entityId, false));
 }
 
 void Hero::Construct(void *data) {