[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:
VladimirMangos 2010-12-27 05:05:30 +03:00
parent 246126d7b4
commit 3c58f25ad9
2 changed files with 2 additions and 3 deletions

View file

@ -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);