Skip to content

Commit

Permalink
Fix eai console error
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife authored and cyberium committed Apr 14, 2017
1 parent 72dc8b6 commit 920df09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/AI/CreatureEventAIMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,9 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
continue;
case EVENT_T_DEATH:
{
if (!sConditionStorage.LookupEntry<PlayerCondition>(temp.death.conditionId)) // condition does not exist for some reason
if (temp.death.conditionId && !sConditionStorage.LookupEntry<PlayerCondition>(temp.death.conditionId))
{
// condition does not exist for some reason
sLog.outErrorDb("Creature %u has `ConditionId` = %u but does not exist. Setting ConditionId to 0 for event %u.", temp.creature_id, temp.death.conditionId, i);
temp.death.conditionId = 0;
}
Expand Down

0 comments on commit 920df09

Please sign in to comment.