-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[12442] Reorder handling in Creature::SetDeathState(JUST_ALIVE) case
This will behave more logical in case of root/stunn or similar auras which are to be loaded by _addon tables
- Loading branch information
1 parent
e91ad73
commit 097f902
Showing
2 changed files
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1551,21 +1551,16 @@ void Creature::SetDeathState(DeathState s) | |
|
||
if (s == JUST_ALIVED) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
DomGries
Contributor
|
||
{ | ||
CreatureInfo const* cinfo = GetCreatureInfo(); | ||
clearUnitState(UNIT_STAT_ALL_STATE); | ||
|
||
Unit::SetDeathState(ALIVE); | ||
|
||
SetHealth(GetMaxHealth()); | ||
SetLootRecipient(NULL); | ||
SetWalk(true, true); | ||
|
||
if (GetTemporaryFactionFlags() & TEMPFACTION_RESTORE_RESPAWN) | ||
ClearTemporaryFaction(); | ||
|
||
Unit::SetDeathState(ALIVE); | ||
|
||
clearUnitState(UNIT_STAT_ALL_STATE); | ||
i_motionMaster.Initialize(); | ||
|
||
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool)); | ||
SetMeleeDamageSchool(SpellSchools(GetCreatureInfo()->dmgschool)); | ||
|
||
// Dynamic flags may be adjusted by spells. Clear them | ||
// first and let spell from *addon apply where needed. | ||
|
@@ -1574,8 +1569,11 @@ void Creature::SetDeathState(DeathState s) | |
|
||
// Flags after LoadCreatureAddon. Any spell in *addon | ||
// will not be able to adjust these. | ||
SetUInt32Value(UNIT_NPC_FLAGS, cinfo->npcflag); | ||
SetUInt32Value(UNIT_NPC_FLAGS, GetCreatureInfo()->npcflag); | ||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); | ||
|
||
SetWalk(true, true); | ||
i_motionMaster.Initialize(); | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#ifndef __REVISION_NR_H__ | ||
#define __REVISION_NR_H__ | ||
#define REVISION_NR "12441" | ||
#define REVISION_NR "12442" | ||
#endif // __REVISION_NR_H__ |
"ALIVED"? ouch! renglish?