forked from insider42/scriptdev2
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuffnpc.cpp
More file actions
473 lines (399 loc) · 18.8 KB
/
buffnpc.cpp
File metadata and controls
473 lines (399 loc) · 18.8 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
/*
* Copyright (C) 2010 Hellscream Network.
*/
#include "precompiled.h"
#include "../../../../shared/Config/Config.h"
#include "../../config.h"
bool GossipHello_BuffNPC(Player* pPlayer, Creature* pCreature)
{
Config SD2Config;
if(!SD2Config.SetSource(_SCRIPTDEV2_CONFIG))
error_log("SD2: Unable to open configuration file");
if(SD2Config.GetBoolDefault("BuffNPC.OnlyGMs", false)) // If BuffNPC.OnlyGMs is enabled in scriptdev2.conf
if (pPlayer->GetSession()->GetSecurity() == SEC_PLAYER)
{
pCreature->MonsterWhisper("Sorry, I can only Buff game masters.", pPlayer->GetGUID());
return true;
}
bool EnableSmallBuff = SD2Config.GetBoolDefault("BuffNPC.EnableSmallBuff", true);
bool EnableGreatBuff = SD2Config.GetBoolDefault("BuffNPC.EnableGreatBuff", true);
bool EnableGMBuff = SD2Config.GetBoolDefault("BuffNPC.EnableGMBuff", true);
bool EnablePlayerTools = SD2Config.GetBoolDefault("BuffNPC.EnablePlayerTools", true);
bool EnableResSickness = SD2Config.GetBoolDefault("BuffNPC.EnableRemoveResSickness", true);
bool EnableGivemeGold = SD2Config.GetBoolDefault("BuffNPC.EnableGivemeGold", false);
// Main Menu for Alliance
if (pPlayer->GetTeam() == ALLIANCE)
{
// Check config if "Small Buff " is enabled or not
if(EnableSmallBuff)
pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff 4 Gold ->" , GOSSIP_SENDER_MAIN, 1000);
// Check config if "Great Buff" is enabled or not
if(EnableGreatBuff){
if(pPlayer->GetMoney()>=(SD2Config.GetFloatDefault("BuffGoldCost",0)))
pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff 8 Gold ->" , GOSSIP_SENDER_MAIN, 2000);
}
// Check config if "GM Buff" is enabled or not
if(EnableGMBuff)
pPlayer->ADD_GOSSIP_ITEM( 7, "GM Buff ->" , GOSSIP_SENDER_MAIN, 3000);
// Check config if "Player Tools" is enabled or not
if(EnablePlayerTools)
pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->" , GOSSIP_SENDER_MAIN, 4000);
}
else // Main Menu for Horde
{
// Check config if "Small Buff " is enabled or not
if(EnableSmallBuff)
pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff 4 Gold ->" , GOSSIP_SENDER_MAIN, 1000);
// Check config if "Great Buff" is enabled or not
if(EnableGreatBuff){
if(pPlayer->GetMoney()>=(SD2Config.GetFloatDefault("BuffGoldCost",0)))
pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff 8 Gold ->" , GOSSIP_SENDER_MAIN, 2000);
}
// Check config if "GM Buff" is enabled or not
if(EnableGMBuff)
pPlayer->ADD_GOSSIP_ITEM( 7, "GM Buff ->" , GOSSIP_SENDER_MAIN, 3000);
// Check config if "Player Tools" is enabled or not
if(EnablePlayerTools)
pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->" , GOSSIP_SENDER_MAIN, 4000);
}
// Check config file if "Remove res sickness" option is enabled or not
if(EnableResSickness)
pPlayer->ADD_GOSSIP_ITEM( 10, "Remove Resurrect Sickness" , GOSSIP_SENDER_MAIN, 5000);
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
return true;
}
void SendDefaultMenu_BuffNPC(Player* pPlayer, Creature* pCreature, uint32 uiAction)
{
// Not allow in combat
if (pPlayer->isInCombat())
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->MonsterSay("You are in combat!", LANG_UNIVERSAL, NULL);
return;
}
Config SD2Config;
if(!SD2Config.SetSource(_SCRIPTDEV2_CONFIG))
error_log("SD2: Unable to open configuration file");
bool EnableSmallBuff = SD2Config.GetBoolDefault("BuffNPC.EnableSmallBuff", true);
bool EnableGreatBuff = SD2Config.GetBoolDefault("BuffNPC.EnableGreatBuff", true);
bool EnableGMBuff = SD2Config.GetBoolDefault("BuffNPC.EnableGMBuff", true);
bool EnablePlayerTools = SD2Config.GetBoolDefault("BuffNPC.EnablePlayerTools", true);
bool EnableResSickness = SD2Config.GetBoolDefault("BuffNPC.EnableRemoveResSickness", true);
bool EnableGivemeGold = SD2Config.GetBoolDefault("BuffNPC.EnableGivemeGold", false);
//Mony Check
if (pPlayer->GetMoney() < ((SD2Config.GetFloatDefault("BuffGoldCost",0))/2))
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->MonsterWhisper("You don't have enough money.", pPlayer->GetGUID());
return;
}
switch(uiAction)
{
case 1000: //Small Buff
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Mark of the Wild" , GOSSIP_SENDER_MAIN, 1001);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Amplify Magic" , GOSSIP_SENDER_MAIN, 1010);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Arcane Intellect" , GOSSIP_SENDER_MAIN, 1015);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Dalaran Intellect" , GOSSIP_SENDER_MAIN, 1020);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Dampen Magic" , GOSSIP_SENDER_MAIN, 1025);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Blessing of Kings" , GOSSIP_SENDER_MAIN, 1030);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Blessing of Might" , GOSSIP_SENDER_MAIN, 1035);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Blessing of Wisdom" , GOSSIP_SENDER_MAIN, 1040);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Divine Spirit" , GOSSIP_SENDER_MAIN, 1045);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Power Word: Fortitude" , GOSSIP_SENDER_MAIN, 1050);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Shadow Protection" , GOSSIP_SENDER_MAIN, 1055);
pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu" , GOSSIP_SENDER_MAIN, 5005);
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;
case 2000: //Great Buff
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Gift of the Wild" , GOSSIP_SENDER_MAIN, 2001);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Arcane Brilliance" , GOSSIP_SENDER_MAIN, 2005);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Dalaran Brilliance" , GOSSIP_SENDER_MAIN, 2010);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Greater Blessing of Kings" , GOSSIP_SENDER_MAIN, 2015);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Greater Blessing of Might" , GOSSIP_SENDER_MAIN, 2020);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Greater Blessing of Sanctuary" , GOSSIP_SENDER_MAIN, 2025);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Greater Blessing of Wisdom" , GOSSIP_SENDER_MAIN, 2030);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Prayer of Fortitude" , GOSSIP_SENDER_MAIN, 2035);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Prayer of Shadow Protection" , GOSSIP_SENDER_MAIN, 2040);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Prayer of Spirit" , GOSSIP_SENDER_MAIN, 2045);
pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu" , GOSSIP_SENDER_MAIN, 5005);
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;
case 3000: //GM Buff
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Agamaggan's Agility" , GOSSIP_SENDER_MAIN, 3001);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Agamaggan's Strength" , GOSSIP_SENDER_MAIN, 3005);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Armor Magic" , GOSSIP_SENDER_MAIN, 3010);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Armor Penetration" , GOSSIP_SENDER_MAIN, 3015);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Increased Stamina" , GOSSIP_SENDER_MAIN, 3020);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Razorhide" , GOSSIP_SENDER_MAIN, 3025);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Rising Spirit" , GOSSIP_SENDER_MAIN, 3030);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Spirit of the Wind" , GOSSIP_SENDER_MAIN, 3035);
pPlayer->ADD_GOSSIP_ITEM( 5, "Buff me Wisdom of Agamaggan" , GOSSIP_SENDER_MAIN, 3040);
pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu" , GOSSIP_SENDER_MAIN, 5005);
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;
case 4000: //Player Tools
// Check config if "Give me Gold" is enabled or not
if(EnableGivemeGold)
pPlayer->ADD_GOSSIP_ITEM( 5, "Give me Gold" , GOSSIP_SENDER_MAIN, 4001);
pPlayer->ADD_GOSSIP_ITEM( 5, "Give me Soul Shards" , GOSSIP_SENDER_MAIN, 4005);
pPlayer->ADD_GOSSIP_ITEM( 5, "Heal me Please" , GOSSIP_SENDER_MAIN, 4010);
pPlayer->ADD_GOSSIP_ITEM( 5, "Heal me and party members Please" , GOSSIP_SENDER_MAIN, 4015);
pPlayer->ADD_GOSSIP_ITEM( 5, "Conjure Refreshment" , GOSSIP_SENDER_MAIN, 4020);
pPlayer->ADD_GOSSIP_ITEM( 5, "Conjure Mana Gem" , GOSSIP_SENDER_MAIN, 4025);
pPlayer->ADD_GOSSIP_ITEM( 7, "<- Main Menu" , GOSSIP_SENDER_MAIN, 5005);
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;
case 5005: //Back To Main Menu
// Main Menu for Alliance
if (pPlayer->GetTeam() == ALLIANCE)
{
// Check config if "Small Buff " is enabled or not
if(EnableSmallBuff)
pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff 4 Gold ->" , GOSSIP_SENDER_MAIN, 1000);
// Check config if "Great Buff" is enabled or not
if(EnableGreatBuff){
if(pPlayer->GetMoney()>=(SD2Config.GetFloatDefault("BuffGoldCost",0)))
pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff 8 Gold ->" , GOSSIP_SENDER_MAIN, 2000);
}
// Check config if "GM Buff" is enabled or not
if(EnableGMBuff)
pPlayer->ADD_GOSSIP_ITEM( 7, "GM Buff ->" , GOSSIP_SENDER_MAIN, 3000);
// Check config if "Player Tools" is enabled or not
if(EnablePlayerTools)
pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->" , GOSSIP_SENDER_MAIN, 4000);
}
else // Main Menu for Horde
{
// Check config if "Small Buff " is enabled or not
if(EnableSmallBuff)
pPlayer->ADD_GOSSIP_ITEM( 7, "Small Buff 4 Gold ->" , GOSSIP_SENDER_MAIN, 1000);
// Check config if "Great Buff" is enabled or not
if(EnableGreatBuff){
if(pPlayer->GetMoney()>=(SD2Config.GetFloatDefault("BuffGoldCost",0)))
pPlayer->ADD_GOSSIP_ITEM( 7, "Great Buff 8 Gold ->" , GOSSIP_SENDER_MAIN, 2000);
}
// Check config if "GM Buff" is enabled or not
if(EnableGMBuff)
pPlayer->ADD_GOSSIP_ITEM( 7, "GM Buff ->" , GOSSIP_SENDER_MAIN, 3000);
// Check config if "Player Tools" is enabled or not
if(EnablePlayerTools)
pPlayer->ADD_GOSSIP_ITEM( 7, "Player Tools ->" , GOSSIP_SENDER_MAIN, 4000);
}
// Check if Ress Sickness option is enabled in scriptdev2.conf
if(EnableResSickness)
pPlayer->ADD_GOSSIP_ITEM( 10, "Remove Resurrect Sickness" , GOSSIP_SENDER_MAIN, 5000);
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetGUID());
break;
//////////////////////////////////////////////////Small Buff///////////////////////////////////////////////////////////////
case 1001: // Buff me Mark of the Wild
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,48469,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1010: // Buff me Amplify Magic
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,43017,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1015: // Buff me Arcane Intellect
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,42995,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1020: // Buff me Dalaran Intellect
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,61024,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1025: // Buff me Dampen Magic
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,43015,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1030: // Buff me Blessing of Kings
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,20217,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1035: // Buff me Blessing of Might
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,48932,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1040: // Buff me Blessing of Wisdom
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,48936,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1045: // Buff me Divine Spirit
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,48073,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1050: // Buff me Power Word: Fortitude
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,48161,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
case 1055: // Buff me Shadow Protection
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,48169,false);
pPlayer->ModifyMoney(-((SD2Config.GetFloatDefault("BuffGoldCost",0))/2));
break;
//////////////////////////////////////////////////Great Buff///////////////////////////////////////////////////////////////
case 2001: // Buff me Gift of the Wild
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,48470,true);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2005: // Buff me Arcane Brilliance
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,43002,true);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2010: // Buff me Dalaran Brilliance
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,61316,true);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2015: // Buff me Greater Blessing of Kings
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,25898,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2020: // Buff me Greater Blessing of Might
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,48934,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2025: // Buff me Greater Blessing of Sanctuary
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,25899,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2030: // Buff me Greater Blessing of Wisdom
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,48938,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2035: // Buff me Prayer of Fortitude
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,48162,true);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2040: // Buff me Prayer of Shadow Protection
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,48170,true);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 2045: // Buff me Prayer of Spirit
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,48074,true);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
//////////////////////////////////////////////////GM Buff///////////////////////////////////////////////////////////////
case 3001: // Buff me Agamaggan's Agility
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,17013,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 3005: // Buff me Agamaggan's Strength
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,16612,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 3010: // Buff me Armor Magic
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,58453,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 3015: // Buff me Armor Penetration
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,34106,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 3020: // Buff me Increased Stamina
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,25661,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 3025: // Buff me Razorhide
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,16610,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 3030: // Buff me Rising Spirit
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,10767,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 3035: // Buff me Spirit of the Wind
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,16618,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 3040: // Buff me Wisdom of Agamaggan
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,7764,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
//////////////////////////////////////////////////Player Tools///////////////////////////////////////////////////////////////
case 4001://Give me Gold
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,46642,false); // 5000 gold
break;
case 4005://Give me Soul Shards
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,24827,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 4010: // Heal me please
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer,38588,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 4015: // Heal me and party members Please
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,53251,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 4020: // Conjure Refreshment
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,42956,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 4025: // Conjure Mana Gem
pPlayer->CLOSE_GOSSIP_MENU();
pPlayer->CastSpell(pPlayer,42985,false);
pPlayer->ModifyMoney(-(SD2Config.GetFloatDefault("BuffGoldCost",0)));
break;
case 5000://Remove Res Sickness
if(!pPlayer->HasAura(SPELL_ID_PASSIVE_RESURRECTION_SICKNESS,EFFECT_INDEX_0))
{
pCreature->MonsterWhisper("You don't have resurrection sickness.", pPlayer->GetGUID());
GossipHello_BuffNPC(pPlayer, pCreature);
return;
}
pCreature->CastSpell(pPlayer,38588,false); // Healing effect
pPlayer->RemoveAurasDueToSpell(SPELL_ID_PASSIVE_RESURRECTION_SICKNESS);
pPlayer->CLOSE_GOSSIP_MENU();
break;
pPlayer->CLOSE_GOSSIP_MENU();
} // end of switch
} //end of function
bool GossipSelect_BuffNPC(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
{
// Main menu
if (uiSender == GOSSIP_SENDER_MAIN)
SendDefaultMenu_BuffNPC(pPlayer, pCreature, uiAction);
return true;
}
void AddSC_buffnpc()
{
Script *newscript;
newscript = new Script;
newscript->Name = "buffnpc";
newscript->pGossipHello = &GossipHello_BuffNPC;
newscript->pGossipSelect = &GossipSelect_BuffNPC;
newscript->RegisterSelf();
}