-
Notifications
You must be signed in to change notification settings - Fork 31
/
levelannounce.cpp
67 lines (57 loc) · 1.85 KB
/
levelannounce.cpp
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
#include "ScriptPCH.h"
class custom_LevelAnnounce : public PlayerScript
{
public:
custom_LevelAnnounce() : PlayerScript("custom_LevelAnnounce") {}
void OnLevelChanged(Player* player, Item* item, uint8 newLevel)
{
ItemPosCountVec dest;
switch (newLevel)
{
case 10:
case 20:
case 30:
case 40:
case 50:
player->CastSpell(player, 38186, true);
ChatHandler(player->GetSession()).PSendSysMessage("Your character has leveled so fast that you have earned 10 leveling souls!");
break;
case 60:
case 70:
case 80:
case 90:
case 100:
player->CastSpell(player, 38186, true);
ChatHandler(player->GetSession()).PSendSysMessage("Your character has leveled so fast that you have earned 25 leveling souls!");
break;
case 110:
case 120:
case 130:
case 140:
case 150:
player->CastSpell(player, 38186, true);
ChatHandler(player->GetSession()).PSendSysMessage("Your character has leveled so fast that you have earned 50 leveling souls!");
break;
case 160:
case 170:
case 180:
case 190:
case 200:
player->CastSpell(player, 38186, true);
ChatHandler(player->GetSession()).PSendSysMessage("Your character has leveled so fast that you have earned 75 leveling souls!");
break;
case 210:
case 220:
case 230:
case 240:
player->CastSpell(player, 38186, true);
ChatHandler(player->GetSession()).PSendSysMessage("Your character has leveled so fast that you have earned 100 leveling souls!");
break;
default: break;
}
}
};
void AddSC_custom_LevelAnnounce()
{
new custom_LevelAnnounce();
}