Skip to content

Commit 978cd98

Browse files
committed
fix: build
1 parent 42cb223 commit 978cd98

File tree

2 files changed

+24
-22
lines changed

2 files changed

+24
-22
lines changed

src/SystemVip.cpp

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ string SystemVip::getFormatedVipTime(Player* player) {
8686

8787
hours = hours % 24;
8888
minutes = minutes % 60;
89-
int seconds = time % 60;
89+
// int seconds = time % 60;
9090

9191
string result = to_string(days) + "dias " + to_string(hours) + "horas " + to_string(minutes) + "minutos.";
9292
return result;
@@ -109,8 +109,9 @@ string SystemVip::getItemLink(uint32 entry, Player* player) {
109109
string SystemVip::getInformationVip(Player* player) {
110110
std::ostringstream text;
111111
std::string accName;
112-
if (AccountMgr::GetName(player->GetSession()->GetAccountId(), accName));
113-
text << "Tiempo restante: |CFF0DD617" << getFormatedVipTime(player) << "|r\n";
112+
if (AccountMgr::GetName(player->GetSession()->GetAccountId(), accName))
113+
text << "Tiempo restante: |CFF0DD617" << getFormatedVipTime(player) << "|r\n";
114+
114115
return text.str();
115116
}
116117

@@ -149,19 +150,20 @@ string SystemVip::getInformationAdavantages() {
149150
if(resetInstance)
150151
text << "|TInterface/ICONS/Achievement_Dungeon_Icecrown_IcecrownEntrance:15:15:-10::-8|t Reiniciar instancias." << "\n";
151152
if(saveTeleport)
152-
text << "|TInterface/ICONS/Spell_Holy_LightsGrace:15:15:-10::-8|t Guardar zonas para teleport." << "\n";
153+
text << "|TInterface/ICONS/Spell_Holy_LightsGrace:15:15:-10::-8|t Guardar zonas para teleport." << "\n";
153154
}
154155
return text.str();
155156
}
156157

157158
void SystemVip::sendGossipInformation(Player* player, bool advantages) {
158159
std::ostringstream text;
159160
std::string accName;
160-
if (AccountMgr::GetName(player->GetSession()->GetAccountId(), accName));
161-
text << "Usuario: |CFF0E3CE6" << accName << "|r\n";
161+
if (AccountMgr::GetName(player->GetSession()->GetAccountId(), accName))
162+
text << "Usuario: |CFF0E3CE6" << accName << "|r\n";
163+
162164
if (isVip(player)) {
163165
text << "Tiempo restante: |CFF0DD617" << getFormatedVipTime(player) << "|r\n\n";
164-
text << "Gracias por comprar una suscripcion vip.\n\n";
166+
text << "Gracias por comprar una suscripcion vip.\n\n";
165167
}
166168
else {
167169
text << "No tienes una suscripción vip disponible.\n";
@@ -206,7 +208,7 @@ void SystemVip::delExpireVip(Player* player) {
206208
string SystemVip::getLoginMessage(Player* player) {
207209
string welcomeMessage = loginMessage;
208210
string name = player->GetName();
209-
size_t pos = welcomeMessage.find("%s");
211+
size_t pos = welcomeMessage.find("%s");
210212

211213
if (pos != std::string::npos) {
212214
welcomeMessage.replace(pos, 2, name);
@@ -234,13 +236,13 @@ void SystemVip::addTeleportVip(Player* player, string name) {
234236
uint32 id = 1;
235237
if (teleportMap.count(accountId) > 0) {
236238
if (teleportMap[accountId].size() == saveTeleportAmount) {
237-
player->GetSession()->SendNotification("No puedes guardar mas Teleports!");
239+
ChatHandler(player->GetSession()).PSendSysMessage("No puedes guardar mas Teleports!");
238240
return;
239241
}
240242

241243
for (size_t i = 0; i < teleportMap[accountId].size(); i++) {
242244
if (teleportMap[accountId][i].name == teleport.name) {
243-
player->GetSession()->SendNotification("Ya existe un teleport con el mismo nombre!");
245+
ChatHandler(player->GetSession()).PSendSysMessage("Ya existe un teleport con el mismo nombre!");
244246
return;
245247
}
246248
}
@@ -261,7 +263,7 @@ void SystemVip::delTeleportVip(Player* player, string name) {
261263
return;
262264
}
263265
}
264-
player->GetSession()->SendNotification("Nombre incorrecto.");
266+
ChatHandler(player->GetSession()).PSendSysMessage("Nombre incorrecto.");
265267
}
266268

267269
void SystemVip::getTeleports(Player* player) {

src/system_vip_scripts.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class SystemVipVendor : public CreatureScript {
101101
OnGossipSelect(player, creature, 0, 2);
102102
}
103103
else {
104-
player->GetSession()->SendNotification("No tienes suficientes Tokens.");
104+
ChatHandler(player->GetSession()).PSendSysMessage("No tienes suficientes Tokens.");
105105
CloseGossipMenuFor(player);
106106
}
107107
break;
@@ -133,20 +133,20 @@ class SystemVipPocket : ItemScript {
133133
public:
134134
SystemVipPocket() : ItemScript("SystemVipPocket") {}
135135

136-
bool OnUse(Player* player, Item* item, SpellCastTargets const& /*targets*/) {
136+
bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& /*targets*/) {
137137
if (!sV->isVip(player)) {
138-
player->GetSession()->SendNotification("No eres Vip!");
138+
ChatHandler(player->GetSession()).PSendSysMessage("No eres Vip!");
139139
ChatHandler(player->GetSession()).PSendSysMessage("Por favor renueva tu suscription vip.");
140140
return false;
141141
}
142142

143143
/*if (player->IsInCombat()) {
144-
player->GetSession()->SendNotification("Estas en combate!");
144+
ChatHandler(player->GetSession()).PSendSysMessage("Estas en combate!");
145145
return false;
146146
}*/
147147

148148
if (player->GetMap()->IsBattleArena()) {
149-
player->GetSession()->SendNotification("No puedes usar en arena!");
149+
ChatHandler(player->GetSession()).PSendSysMessage("No puedes usar en arena!");
150150
return false;
151151
}
152152

@@ -215,7 +215,7 @@ class SystemVipPet : CreatureScript {
215215
{
216216
case 1:
217217
if (player->IsInCombat()) {
218-
player->GetSession()->SendNotification("Estás en combate!");
218+
ChatHandler(player->GetSession()).PSendSysMessage("Estás en combate!");
219219
CloseGossipMenuFor(player);
220220
}
221221
else {
@@ -243,29 +243,29 @@ class SystemVipPet : CreatureScript {
243243
if (player->IsInCombat())
244244
{
245245
CloseGossipMenuFor(player);
246-
player->GetSession()->SendNotification("Estás en combate!");
246+
ChatHandler(player->GetSession()).PSendSysMessage("Estás en combate!");
247247
return false;
248248
}
249249
else if (player->getPowerType() == POWER_MANA)
250250
player->SetPower(POWER_MANA, player->GetMaxPower(POWER_MANA));
251251

252252
player->SetHealth(player->GetMaxHealth());
253-
player->GetSession()->SendNotification("HP/MANA Restaurados!");
253+
ChatHandler(player->GetSession()).PSendSysMessage("HP/MANA Restaurados!");
254254
creature->CastSpell(player, 31726, true);
255255
OnGossipHello(player, creature);
256256
break;
257257
case 6:
258258
if (player->HasAura(15007))
259259
player->RemoveAura(15007);
260-
player->GetSession()->SendNotification("Tu dolencia fué removido.");
260+
ChatHandler(player->GetSession()).PSendSysMessage("Tu dolencia fué removido.");
261261
creature->CastSpell(player, 31726, true);
262262
OnGossipHello(player, creature);
263263
break;
264264
case 7:
265265
// remover desertor
266266
if(player->HasAura(26013))
267267
player->RemoveAura(26013);
268-
player->GetSession()->SendNotification("Tu marca de desertor fué removido.");
268+
ChatHandler(player->GetSession()).PSendSysMessage("Tu marca de desertor fué removido.");
269269
creature->CastSpell(player, 31726);
270270
OnGossipHello(player, creature);
271271
break;
@@ -291,7 +291,7 @@ class SystemVipPet : CreatureScript {
291291
}
292292
}
293293

294-
player->GetSession()->SendNotification("Tus instancias fueron reinicidas!");
294+
ChatHandler(player->GetSession()).PSendSysMessage("Tus instancias fueron reinicidas!");
295295
creature->CastSpell(player, 59908);
296296
OnGossipHello(player, creature);
297297
return true;

0 commit comments

Comments
 (0)