mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19: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
|
// Player's state will be cleared in Player::UpdateContestedPvP
|
||||||
if (GetTypeId() != TYPEID_PLAYER)
|
if (GetTypeId() != TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
Creature* creature = (Creature*)this;
|
if (((Creature*)this)->GetCreatureInfo()->unit_flags & UNIT_FLAG_OOC_NOT_ATTACKABLE)
|
||||||
if (creature->GetCreatureInfo() && creature->GetCreatureInfo()->unit_flags & UNIT_FLAG_OOC_NOT_ATTACKABLE)
|
|
||||||
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||||
|
|
||||||
clearUnitState(UNIT_STAT_ATTACK_PLAYER);
|
clearUnitState(UNIT_STAT_ATTACK_PLAYER);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10921"
|
#define REVISION_NR "10922"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue