All pastes #988561 Raw Edit

Etwas

public text v1 · immutable
#988561 ·published 2008-04-17 18:38 UTC
rendered paste body
bool ItemUse_item_cooking_pot(Player *player, Item* _Item, SpellCastTargets const& targets)
{
	if (player->GetQuestStatus(11379) == QUEST_STATUS_INCOMPLETE)
	{
		Unit * unit_target = targets.getUnitTarget();
		if( unit_target )	// only cast on corpse 19973
		{
			((Creature*)unit_target)->RemoveCorpse();		// remove corpse for cancelling second use
			return false;									// all ok
		}
	}
	WorldPacket data(SMSG_CAST_RESULT, (4+2));              // prepare packet error message
	data << uint32(33852);                                	// itemId
	data << uint8(SPELL_FAILED_BAD_TARGETS);                // reason
	player->GetSession()->SendPacket(&data);                // send message: Bad target
	player->SendEquipError(EQUIP_ERR_NONE,_Item,NULL);      // break spell	
	return true;
}