[10383] Store guid instaed pointer for first user of GAMEOBJECT_TYPE_SUMMONING_RITUAL

This is more safe way in pointer store comparison with.
LAso Some related code cleanups.
This commit is contained in:
VladimirMangos 2010-08-20 12:54:35 +04:00
parent b672913633
commit 0649b508e4
5 changed files with 81 additions and 71 deletions

View file

@ -364,7 +364,7 @@ void WorldSession::DoLootRelease(ObjectGuid lguid)
}
else if (go->GetGoType() == GAMEOBJECT_TYPE_FISHINGHOLE)
{ // The fishing hole used once more
go->AddUse(); // if the max usage is reached, will be despawned in next tick
go->AddUse(); // if the max usage is reached, will be despawned at next tick
if (go->GetUseCount() >= urand(go->GetGOInfo()->fishinghole.minSuccessOpens,go->GetGOInfo()->fishinghole.maxSuccessOpens))
{
go->SetLootState(GO_JUST_DEACTIVATED);