mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[10922] Revert "[8722] Fixed possible creash."
This reverts commit 8dd3e4b31a31bb6dfc4d9fb51b1b7e67bad4ca16. This is impossible crash case. Creature object can't be created without creatureInfo != NULL So crash source can be only result wrong calling ClearInCombat() for deleted or NULL creature.
This commit is contained in:
parent
246126d7b4
commit
3c58f25ad9
2 changed files with 2 additions and 3 deletions
|
|
@ -7731,8 +7731,7 @@ void Unit::ClearInCombat()
|
|||
// Player's state will be cleared in Player::UpdateContestedPvP
|
||||
if (GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
Creature* creature = (Creature*)this;
|
||||
if (creature->GetCreatureInfo() && creature->GetCreatureInfo()->unit_flags & UNIT_FLAG_OOC_NOT_ATTACKABLE)
|
||||
if (((Creature*)this)->GetCreatureInfo()->unit_flags & UNIT_FLAG_OOC_NOT_ATTACKABLE)
|
||||
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
|
||||
clearUnitState(UNIT_STAT_ATTACK_PLAYER);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue