void GameObject::EndFishing(Player* player, bool abort ) { Spell * spell = player->GetCurrentSpell(); if(spell) { if(abort) // abort becouse of a reason { //FIXME: here 'failed' should appear over progress bar spell->cancel(); } else // spell ended { if (!(GetUInt32Value(GAMEOBJECT_FLAGS) & 32)) // if there was no loot spell->SendCastResult(SPELL_FAILED_NO_FISH); spell->SendChannelUpdate(0); spell->finish(); /*if(this->IsInWorld()) RemoveFromWorld(); delete this;*/ ExpireAndDelete(); return; } } else // if this is called, and there is no spell so remove the gameobject { if(this->IsInWorld()) RemoveFromWorld(); delete this; } }