Unit.cpp has changed variable name.

Issue #36 resolved
lordpsyan created an issue

Around line 572...

         for (ControlList::const_iterator itr = victim->ToPlayer()->m_Controlled.begin(); itr != victim->ToPlayer()->m_Controlled.end(); ++itr)
             if (Creature* cre = (*itr)->ToCreature())
                 if (cre->GetIAmABot() && cre->IsAIEnabled)
                     cre->AI()->OwnerDamagedBy(this);

They changed OwnerDamagedBy to OwnerAttackedBy. not a big deal, but it still crashes the server when you attack with a spell (without a bot). I modified this, and it seemed to work fine.... until my warrior bot tried to use a potion. Seems there is much that needs fixed. My modification was:

         for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
             if (Creature* cre = (*itr)->ToCreature())
                 if (cre->GetIAmABot() && cre->IsAIEnabled)
                     cre->AI()->OwnerAttackedBy(this);

I could not find ControlList in a for loop that had anything with victim->ToPlayer-> in it.

Was so looking forward to this patch...

Comments (1)

  1. Log in to comment