File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -282,12 +282,18 @@ void WorldSession::DoLootRelease(ObjectGuid lguid)
282282 else if (loot->isLooted () || go->GetGoType () == GAMEOBJECT_TYPE_FISHINGNODE)
283283 {
284284 if (go->GetGoType () == GAMEOBJECT_TYPE_FISHINGHOLE)
285- { // The fishing hole used once more
286- go->AddUse (); // if the max usage is reached, will be despawned in next tick
287- if (go->GetUseCount () >= go->GetGOValue ()->FishingHole .MaxOpens )
288- go->SetLootState (GO_JUST_DEACTIVATED);
289- else
290- go->SetLootState (GO_READY);
285+ {
286+ bool allOpensConsumed = false ;
287+ if (go->GetGOValue ()->FishingHole .MaxOpens )
288+ {
289+ // The fishing hole used once more
290+ go->AddUse ();
291+
292+ // If the max usage is reached, will be despawned in next tick
293+ allOpensConsumed = go->GetUseCount () >= go->GetGOValue ()->FishingHole .MaxOpens ;
294+ }
295+
296+ go->SetLootState (allOpensConsumed ? GO_JUST_DEACTIVATED : GO_READY);
291297 }
292298 else
293299 go->SetLootState (GO_JUST_DEACTIVATED);
You can’t perform that action at this time.
0 commit comments