Reloac
BETA Tester
Hey
Been working on my item teleporter, and of course.. trying to add a new thing, the first i did worked like a charm but trying to make it resurrect someone when they use the item when dead, is proving to be harder than i thought, I've trolled through the source code to try and find other resurrect method but this was the only that i could find, and all i get when trying to use it is :
http://puu.sh/6wyBF.jpg
The combat one works perfectly, shows the error when someone is in combat and doesn't open the window.
& also tried it when a ghost/released and when i still have the release option.
Any help would be awesome, as i have no idea right now..
Been working on my item teleporter, and of course.. trying to add a new thing, the first i did worked like a charm but trying to make it resurrect someone when they use the item when dead, is proving to be harder than i thought, I've trolled through the source code to try and find other resurrect method but this was the only that i could find, and all i get when trying to use it is :
http://puu.sh/6wyBF.jpg
The combat one works perfectly, shows the error when someone is in combat and doesn't open the window.
Code:
bool OnUse(Player* player, Item* item, SpellCastTargets const& targets)
{
if (player->IsInCombat())
{
ChatHandler(player->GetSession()).PSendSysMessage("[Error] Stone cannot be used in combat..");
return false;
}
if (player->IsAlive())
{
player->ResurrectPlayer(1.0f);
}
player->PlayerTalkClass->ClearMenus();
player->ADD_GOSSIP_ITEM(0, "|TInterface\\icons\\inv_misc_map02:30|t World Map", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
player->ADD_GOSSIP_ITEM(0, "|TInterface\\icons\\achievement_pvp_h_15:30|t PvP Arena", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
player->ADD_GOSSIP_ITEM(0, "|TInterface\\icons\\ability_paladin_swiftretribution:30|t Services", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
player->SEND_GOSSIP_MENU(1, item->GetGUID());
return true;
}
& also tried it when a ghost/released and when i still have the release option.
Any help would be awesome, as i have no idea right now..
Last edited: