Skip to content

Commit

Permalink
fix(Build): Remove MonsterTexts (azerothcore#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitzunu authored Oct 16, 2021
1 parent 1eba90a commit 8f199f2
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
52 changes: 26 additions & 26 deletions modules/mod-guildhouse/src/scripts/npc_guildhouse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class npc_guild_master : public CreatureScript
{
char msg[200];
sprintf(msg, MSG_ALREADYHAVEGHADD);
_creature->MonsterWhisper(MSG_ALREADYHAVEGHADD, player, true);
_creature->Whisper(MSG_ALREADYHAVEGHADD, LANG_UNIVERSAL, player, true);
}
return true;
}
Expand All @@ -143,7 +143,7 @@ class npc_guild_master : public CreatureScript
//whisper to player "already have etc..."
char msg[200];
sprintf(msg, MSG_ALREADYHAVEGH);
_creature->MonsterWhisper(msg, player);
_creature->Whisper(msg, LANG_UNIVERSAL, player);
}
return true;
}
Expand All @@ -156,14 +156,14 @@ class npc_guild_master : public CreatureScript
if (player->GetGuildId() == 0)
{
//if player has no guild
_creature->MonsterWhisper(MSG_NOTINGUILD, player);
_creature->Whisper(MSG_NOTINGUILD, LANG_UNIVERSAL, player);
return;
}

if (!player->getAttackers().empty())
{
//if player in combat
_creature->MonsterSay(MSG_INCOMBAT, LANG_UNIVERSAL, 0);
_creature->Say(MSG_INCOMBAT, LANG_UNIVERSAL, 0);
return;
}

Expand All @@ -176,7 +176,7 @@ class npc_guild_master : public CreatureScript
player->TeleportTo(map, x, y, z, o);
}
else
_creature->MonsterWhisper(MSG_NOGUILDHOUSE, player);
_creature->Whisper(MSG_NOGUILDHOUSE, LANG_UNIVERSAL, player);
};

bool showBuyList(Player *player, Creature *_creature, uint32 showFromId = 0)
Expand Down Expand Up @@ -246,7 +246,7 @@ class npc_guild_master : public CreatureScript
if (showFromId == 0)
{
//all guildhouses are occupied
_creature->MonsterWhisper(MSG_NOFREEGH, player);
_creature->Whisper(MSG_NOFREEGH, LANG_UNIVERSAL, player);
CloseGossipMenuFor(player);
}
else
Expand Down Expand Up @@ -328,7 +328,7 @@ class npc_guild_master : public CreatureScript
if (showFromId == 0)
{
//all no GhAdd to Show
_creature->MonsterWhisper(MSG_NOADDGH, player);
_creature->Whisper(MSG_NOADDGH, LANG_UNIVERSAL, player);
CloseGossipMenuFor(player);
}
else
Expand Down Expand Up @@ -378,7 +378,7 @@ class npc_guild_master : public CreatureScript

if (!result)
{
_creature->MonsterWhisper(MSG_GHOCCUPIED, player);
_creature->Whisper(MSG_GHOCCUPIED, LANG_UNIVERSAL, player);
return;
}

Expand All @@ -390,14 +390,14 @@ class npc_guild_master : public CreatureScript
//show how much money player need to buy GH (in gold)
char msg[200];
sprintf(msg, MSG_NOTENOUGHMONEY, price);
_creature->MonsterWhisper(msg, player);
_creature->Whisper(msg, LANG_UNIVERSAL, player);
return;
}

GHobj.ChangeGuildHouse(player->GetGuildId(), guildhouseId);

player->ModifyMoney(-(price*10000));
_creature->MonsterSay(MSG_CONGRATULATIONS, LANG_UNIVERSAL, 0);
_creature->Say(MSG_CONGRATULATIONS, LANG_UNIVERSAL);
};

bool confirmBuyAdd(Player *player, Creature *_creature, uint32 gh_Add)
Expand Down Expand Up @@ -438,7 +438,7 @@ class npc_guild_master : public CreatureScript
//show how much money player need to buy GH (in gold)
char msg[200];
sprintf(msg, MSG_NOTENOUGHMONEY, price);
_creature->MonsterWhisper(msg, player);
_creature->Whisper(msg, LANG_UNIVERSAL, player);
return;
}

Expand Down Expand Up @@ -471,7 +471,7 @@ class npc_guild_master : public CreatureScript
//display message e.g. "here your money etc."
char msg[200];
sprintf(msg, MSG_SOLD, price * 3 / 4);
_creature->MonsterWhisper(msg, player);
_creature->Whisper(msg, LANG_UNIVERSAL, player);
}
};

Expand Down Expand Up @@ -628,18 +628,18 @@ class guild_guard : public CreatureScript
char msg[500];
if (AccountMgr::IsGMAccount(player->GetSession()->GetSecurity()))
{
_Creature->MonsterWhisper("Ciao gm!", player); //solo gm traduzione non necessaria
_Creature->Whisper("Ciao gm!", LANG_UNIVERSAL, player); //solo gm traduzione non necessaria
if (guardguild)
{
sprintf(msg, "Il mio id di gilda: %u", guardguild);
_Creature->MonsterWhisper(msg, player);
_Creature->Whisper(msg, LANG_UNIVERSAL, player);
if (_Creature->GetEntry() == NPC_GUARD_1)
_Creature->MonsterWhisper("Il mio raggio d'azione: 100y", player);
_Creature->Whisper("Il mio raggio d'azione: 100y", LANG_UNIVERSAL, player);
else
_Creature->MonsterWhisper("Il mio raggio d'azione: 50y", player);
_Creature->Whisper("Il mio raggio d'azione: 50y", LANG_UNIVERSAL, player);
}
else
_Creature->MonsterWhisper("Sono una Guardia Bugga!", player);
_Creature->Whisper("Sono una Guardia Bugga!", LANG_UNIVERSAL, player);
}

/////////////////////////////////
Expand Down Expand Up @@ -671,7 +671,7 @@ class guild_guard : public CreatureScript
if (_Creature->GetAI())
{
_Creature->GetAI()->SetData(0,1);
_Creature->MonsterYell("Protezione Attivata", LANG_UNIVERSAL, 0);
_Creature->Yell("Protezione Attivata", LANG_UNIVERSAL);
}

}
Expand All @@ -680,7 +680,7 @@ class guild_guard : public CreatureScript
if (_Creature->GetAI())
{
_Creature->GetAI()->SetData(0,0);
_Creature->MonsterYell("Protezione Disattivata", LANG_UNIVERSAL, 0);
_Creature->Yell("Protezione Disattivata", LANG_UNIVERSAL);
}
}
}
Expand Down Expand Up @@ -770,7 +770,7 @@ class guild_guard : public CreatureScript
uint32 guild = plr->GetGuildId();
if (guardguild && guild != guardguild)
{
me->MonsterYell(SAY_AGGRO, LANG_UNIVERSAL, 0);
me->Yell(SAY_AGGRO, LANG_UNIVERSAL);
me->Kill(me,plr);
}
}
Expand All @@ -779,7 +779,7 @@ class guild_guard : public CreatureScript
uint32 guild = plr->GetGuildId();
if (guardguild && guild != guardguild)
{
me->MonsterWhisper(SAY_WARNING, plr);
me->Whisper(SAY_WARNING, LANG_UNIVERSAL, plr);
}
}
}
Expand Down Expand Up @@ -867,7 +867,7 @@ class npc_buffnpc : public CreatureScript
if(!player->getAttackers().empty())
{
CloseGossipMenuFor(player);
_Creature->MonsterSay(MSG_INCOMBAT, LANG_UNIVERSAL, 0);
_Creature->Say(MSG_INCOMBAT, LANG_UNIVERSAL);
return;
}

Expand Down Expand Up @@ -1023,7 +1023,7 @@ class npc_portal : public CreatureScript
if(!player->getAttackers().empty())
{
CloseGossipMenuFor(player);
_Creature->MonsterSay(MSG_INCOMBAT, LANG_UNIVERSAL, 0);
_Creature->Say(MSG_INCOMBAT, LANG_UNIVERSAL);
return;
}

Expand Down Expand Up @@ -1175,14 +1175,14 @@ namespace
if (player->getLevel() < dest.m_level && !player->IsGameMaster())
{
std::string msg ("You do not have the required level. This destination requires level " + ConvertStr(dest.m_level) + ".");
creature->MonsterWhisper(msg.c_str(), player);
creature->Whisper(msg.c_str(), LANG_UNIVERSAL, player);
return;
}

if (player->GetMoney() < dest.m_cost && !player->IsGameMaster())
{
std::string msg ("You do not have enough money. The price for teleportation is " + ConvertMoney(dest.m_cost) + ".");
creature->MonsterWhisper(msg.c_str(), player);
creature->Whisper(msg.c_str(), LANG_UNIVERSAL, player);
return;
}

Expand All @@ -1205,7 +1205,7 @@ class npc_teleport : public CreatureScript
if(player->IsInCombat())
{
CloseGossipMenuFor(player);
creature->MonsterWhisper("You are in combat. Come back later", player);
creature->Whisper("You are in combat. Come back later", LANG_UNIVERSAL, player);
return true;
}
AffichCat(player, creature);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class npc_han_al : public CreatureScript
return true;

if (!action) {
creature->MonsterWhisper(sAzthLang->get(AZTH_LANG_HS_QUEST_LIMIT_REACHED, player), player);
creature->Whisper(sAzthLang->get(AZTH_LANG_HS_QUEST_LIMIT_REACHED, player), LANG_UNIVERSAL, player);
return true;
}

Expand Down
10 changes: 5 additions & 5 deletions modules/mod-pvp-mode/src/scripts/ProfessionNpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Professions_NPC : public CreatureScript
void CreatureWhisperBasedOnBool(const char *text, Creature *_creature, Player *pPlayer, bool value)
{
if (value)
_creature->MonsterWhisper(text, pPlayer);
_creature->Whisper(text, LANG_UNIVERSAL, pPlayer);
}

uint32 PlayerMaxLevel() const
Expand All @@ -32,7 +32,7 @@ class Professions_NPC : public CreatureScript
if (!pPlayer->IsGameMaster()
&& !sAZTH->GetAZTHPlayer(pPlayer)->isPvP() && pPlayer->GetMaxPersonalArenaRatingRequirement(2) < MIN_RATING) {
std::string msg = "You need to be a Full PvP player and least "+std::to_string(MIN_RATING)+" 2v2 Rating to talk with me!";
_creature->MonsterWhisper(msg.c_str(), pPlayer);
_creature->Whisper(msg.c_str(), LANG_UNIVERSAL, pPlayer);
return true;
}

Expand Down Expand Up @@ -144,17 +144,17 @@ class Professions_NPC : public CreatureScript
void CompleteLearnProfession(Player *pPlayer, Creature *pCreature, SkillType skill)
{
if (PlayerAlreadyHasTwoProfessions(pPlayer) && !IsSecondarySkill(skill)) {
pCreature->MonsterWhisper("You already know two professions!", pPlayer);
pCreature->Whisper("You already know two professions!", LANG_UNIVERSAL, pPlayer);
return;
}

if (pPlayer->GetArenaPoints() < AP_REQ) {
pCreature->MonsterWhisper("You don't have enough Arena Points to buy this profession!", pPlayer);
pCreature->Whisper("You don't have enough Arena Points to buy this profession!", LANG_UNIVERSAL, pPlayer);
return;
}

if (!LearnAllRecipesInProfession(pPlayer, skill))
pCreature->MonsterWhisper("Internal error occured!", pPlayer);
pCreature->Whisper("Internal error occured!", LANG_UNIVERSAL, pPlayer);
}

bool OnGossipSelect(Player* pPlayer, Creature* _creature, uint32 uiSender, uint32 uiAction)
Expand Down

0 comments on commit 8f199f2

Please sign in to comment.