Skip to content

Commit d0e8a25

Browse files
authored
Complete integration of the level-up-to-80 option (docs + GM code generator) (#34)
* Update README.md added usage of the npc exchange to readme * Update README.md small typo fixed * update reward_shop.cpp added case 6 to the comment * update reward_shop.cpp Added function for leveling up to 80 to gm code generation * update reward_shop.cpp Adjustment (workaround) for the optional NPC exchange Simply comment out the lines responsible for the "no" voice output. It is better if the NPCs do not say "no" at all than if an orc, undead, dwarf, human, or goblin speaks with the blood elf voice. If anyone can think of a solution to selectively output the correct "no" with the correct voice, it would be great if this could be further improved. * update README.md added the level up to 80 feature to README
1 parent 809cc9a commit d0e8a25

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Database Actions:
1616
3 = name change
1717
4 = faction change
1818
5 = race change
19+
6 = level up to 80
1920

2021
Upcoming features:
2122
### 1) If a person feels like they could make a website to work with this module it will be great i will merge into the source and also give credit.

src/reward_shop.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Database Actions:
77
3 = name change
88
4 = faction change
99
5 = race change
10+
6 = level up to 80
1011
1112
script made by talamortis
1213
@@ -78,6 +79,7 @@ class reward_shop : public CreatureScript
7879
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "I'd like to generate a name change code.", GOSSIP_SENDER_MAIN, 6);
7980
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "I'd like to generate a faction change code.", GOSSIP_SENDER_MAIN, 7);
8081
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "I'd like to generate a race change code.", GOSSIP_SENDER_MAIN, 8);
82+
AddGossipItemFor(player, GOSSIP_ICON_CHAT, "I'd like to generate a level up code.", GOSSIP_SENDER_MAIN, 9);
8183
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
8284
break;
8385
case 6:
@@ -92,6 +94,10 @@ class reward_shop : public CreatureScript
9294
CharacterDatabase.Query("INSERT INTO `reward_shop` (`action`, `action_data`, `quantity`, `code`, `status`, `PlayerGUID`, `PlayerIP`, `CreatedBy`) VALUES(5, 0, 0, '{}', 0, 0, '0', '{}')", randomcode.str().c_str(), CreatedBy.c_str());
9395
ChatHandler(player->GetSession()).PSendSysMessage("Code was successfully created your code is {}", randomcode.str());
9496
break;
97+
case 9:
98+
CharacterDatabase.Query("INSERT INTO `reward_shop` (`action`, `action_data`, `quantity`, `code`, `status`, `PlayerGUID`, `PlayerIP`, `CreatedBy`) VALUES(6, 0, 0, '{}', 0, 0, '0', '{}')", randomcode.str().c_str(), CreatedBy.c_str());
99+
ChatHandler(player->GetSession()).PSendSysMessage("Code was successfully created your code is {}", randomcode.str());
100+
break;
95101
}
96102
return true;
97103
}
@@ -114,7 +120,7 @@ class reward_shop : public CreatureScript
114120

115121
if (!result)
116122
{
117-
player->PlayDirectSound(9638); // No
123+
//player->PlayDirectSound(9638); // No
118124
creature->Whisper(messageCode.str().c_str(), LANG_UNIVERSAL, player);
119125
creature->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION);
120126
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
@@ -137,7 +143,7 @@ class reward_shop : public CreatureScript
137143

138144
if (status == 1)
139145
{
140-
player->PlayDirectSound(9638); // No
146+
//player->PlayDirectSound(9638); // No
141147
creature->Whisper(messageCode.str().c_str(), LANG_UNIVERSAL, player);
142148
creature->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION);
143149
SendGossipMenuFor(player, DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());

0 commit comments

Comments
 (0)