bool ItemUse_item_yehkinyas_bramble(Player *player, Item* _Item, SpellCastTargets const& targets) { if (player->GetQuestStatus(3520) == QUEST_STATUS_INCOMPLETE) { Unit * unit_target = targets.getUnitTarget(); if( unit_target && unit_target->GetTypeId()==TYPEID_UNIT && unit_target->isDead() && (unit_target->GetEntry()==5307 || unit_target->GetEntry()==5308) )// cast only on corpse 5307 or 5308 { ((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(10699); // 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; }