Jump to content

[FIX] HORDE shaman summon totem display_id error.


eggxp

Recommended Posts

TICKET: 648

https://mangos.lighthouseapp.com/projects/18208-mangos/tickets/648-shaman-in-team-horde-summon-totem-display_id-error

Patch : [10654]

[FIX]

shaman in team HORDE summon totem display_id error.

TAUREN summon totem display_id is same as DRAENEI for example.

the bug is made by

[10296] Move ChooseDisplayId to Creature class for access from script side

[FIX]

totem still can't have anim when destroyed. because it's not DEAD

From f4077e62a1a4c8c4e0bf0bd16148061c483aa23f Mon Sep 17 00:00:00 2001
From: eggxp <[email protected]>
Date: Fri, 29 Oct 2010 08:45:54 +0800
Subject: [PATCH] [FIX] shaman in team HORDE summon totem display_id error.
[FIX] totem still can't have anim when destroyed. because it's not DEAD

---
src/game/Creature.cpp |    6 ++++++
src/game/Totem.cpp    |    1 +
2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 1a1ba8b..91f4193 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -250,6 +250,12 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
        return false;
    }

+    // for totem(ALLIANCE and HORDE have different totem)
+    if (team == HORDE && (cinfo->ModelId[2] || cinfo->ModelId[3]))
+    {
+        display_id = cinfo->ModelId[2] ? cinfo->ModelId[2] : cinfo->ModelId[3];
+    }
+
    CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
    if (!minfo)                                             // Cancel load if no model defined
    {
diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index 87cb0d5..53600d1 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -106,6 +106,7 @@ void Totem::UnSummon()
            ((Creature*)owner)->AI()->SummonedCreatureDespawn((Creature*)this);
    }

+    SetDeathState(DEAD);
    AddObjectToRemoveList();
}

-- 
1.7.3.1.msysgit.0


Link to comment
Share on other sites

totem unsummon part added into [10663]. Thank you.

models data not for me ;)

[added]Just for note: I receive your mail, but not use in past and not plan use my email for reply. So you will need wait restore PMs work at this forum, or point at your account at another forum or github for discussion... Same answer applied and for other ppl who use my email link at forum.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use