forked from Ikesters/UWoWScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhuntervendor.cpp
More file actions
37 lines (31 loc) · 1023 Bytes
/
huntervendor.cpp
File metadata and controls
37 lines (31 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "ScriptPCH.h"
class npc_huntervendor : public CreatureScript
{
public:
npc_huntervendor() : CreatureScript("npc_huntervendor") { }
bool OnGossipHello(Player *pPlayer, Creature *pCreature)
{
if(pPlayer->getClass() == CLASS_HUNTER)
{
pPlayer->GetSession()->SendListInventory(pCreature->GetGUID());
} else {
pPlayer->PlayerTalkClass->SendCloseGossip();
pCreature->MonsterWhisper("Your not a HUNTER, i cant sell to you $N!", pPlayer->GetGUID());
}
return true;
}
bool OnGossipSelect(Player *pPlayer, Creature *pCreature, uint32 sender, uint32 action)
{
pPlayer->PlayerTalkClass->ClearMenus();
if(!pPlayer->getAttackers().empty())
{
pPlayer->PlayerTalkClass->SendCloseGossip();
pCreature->MonsterWhisper("I will not sell items to you $N when your in a fight!",pPlayer->GetGUID());
}
return true;
}
};
void AddSC_npc_huntervendor()
{
new npc_huntervendor();
}