Fix crash in OutdoorPvPWG::UpdateQuestGiverPosition

Fixes issue #342.

--HG--
branch : trunk
This commit is contained in:
Trazom62
2010-01-18 23:45:08 +01:00
parent a1bbbd1421
commit 1c5060f455
+4 -1
View File
@@ -678,7 +678,10 @@ void OutdoorPvPWG::OnCreatureCreate(Creature *creature, bool add)
break;
}
case CREATURE_QUESTGIVER:
m_questgivers[creature->GetDBTableGUIDLow()] = creature;
if (add)
m_questgivers[creature->GetDBTableGUIDLow()] = creature;
else
m_questgivers.erase(creature->GetDBTableGUIDLow());
break;
case CREATURE_ENGINEER:
for (OutdoorPvP::OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)