Kaev icon

Example BasicEvent TC

Kaev | PRO | 06/17/15 07:59:27 PM UTC | 0 ⭐ | 545 👁️ | Never ⏰ | []
text |

620 B

|

None

|

0 👍

/

0 👎

class EventName : public BasicEvent
{
    public:
        EventName(Player& player) : _player(player) { }
         bool Execute(uint64 time, uint32 diff)
        {
             return true;
        }
     private:
        Player& _player;
};
 class aa_banana : public ItemScript
{
    public:
     aa_banana() : ItemScript("aa_banana") { }
	bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) OVERRIDE
    {
		player->m_Events.AddEvent(new EventName(*player), player->m_Events.CalculateTime(4000)); // 4000 = time in milliseconds
    }
};
void AddSC_aa_banana()
{
    new aa_banana();
}

Comments