blackmetal
Exalted Member
Hi, i'm currently learning C++ and i have a question:
I'm looking for a function that when equip item, it does something. Example ( I get this script through internet )
I know Function OnEquip doesn't exists in TC, i'm looking for same function like this
I'm looking for a function that when equip item, it does something. Example ( I get this script through internet )
Code:
#include "ScriptPCH.h"
#define item_id 999043
class lk_ilusion : public ItemScript
{
public:
lk_ilusion() : ItemScript("lk_ilusion") {}
bool OnEquip(Player * player, Item * item_id, SpellCastTargets const& /*targets*/)
{
player->SetDisplayId(21105);
return false;
}
};
void AddSC_lk_ilusion()
{
new lk_ilusion();
}
I know Function OnEquip doesn't exists in TC, i'm looking for same function like this