diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 8a3da1092..ca565e0b9 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -52,12 +52,12 @@ void EntityList::CheckClientAggro(Client *around) void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbose) { float d2 = d*d; - towho->Message(0, "Describing aggro for %s", from_who->GetName()); + towho->Message(Chat::White, "Describing aggro for %s", from_who->GetName()); bool engaged = from_who->IsEngaged(); if(engaged) { Mob *top = from_who->GetHateTop(); - towho->Message(0, ".. I am currently fighting with %s", top == nullptr?"(nullptr)":top->GetName()); + towho->Message(Chat::White, ".. I am currently fighting with %s", top == nullptr?"(nullptr)":top->GetName()); } bool check_npcs = from_who->WillAggroNPCs(); @@ -77,7 +77,7 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo if(!database.GetFactionName(my_primary, namebuf, sizeof(namebuf))) strcpy(namebuf, "(Unknown)"); } - towho->Message(0, ".. I am on faction %s (%d)\n", namebuf, my_primary); + towho->Message(Chat::White, ".. I am on faction %s (%d)\n", namebuf, my_primary); } for (auto it = mob_list.begin(); it != mob_list.end(); ++it) { @@ -91,11 +91,11 @@ void EntityList::DescribeAggro(Client *towho, NPC *from_who, float d, bool verbo if (engaged) { uint32 amm = from_who->GetHateAmount(mob); if (amm == 0) - towho->Message(0, "... %s is not on my hate list.", mob->GetName()); + towho->Message(Chat::White, "... %s is not on my hate list.", mob->GetName()); else - towho->Message(0, "... %s is on my hate list with value %lu", mob->GetName(), (unsigned long)amm); + towho->Message(Chat::White, "... %s is on my hate list with value %lu", mob->GetName(), (unsigned long)amm); } else if (!check_npcs && mob->IsNPC()) { - towho->Message(0, "... %s is an NPC and my npc_aggro is disabled.", mob->GetName()); + towho->Message(Chat::White, "... %s is an NPC and my npc_aggro is disabled.", mob->GetName()); } else { from_who->DescribeAggro(towho, mob, verbose); } @@ -114,13 +114,13 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { if(( t1 > iAggroRange) || ( t2 > iAggroRange) || ( t3 > iAggroRange) ) { - towho->Message(0, "...%s is out of range (fast). distances (%.3f,%.3f,%.3f), range %.3f", mob->GetName(), + towho->Message(Chat::White, "...%s is out of range (fast). distances (%.3f,%.3f,%.3f), range %.3f", mob->GetName(), t1, t2, t3, iAggroRange); return; } if(mob->IsInvisible(this)) { - towho->Message(0, "...%s is invisible to me. ", mob->GetName()); + towho->Message(Chat::White, "...%s is invisible to me. ", mob->GetName()); return; } if((mob->IsClient() && @@ -131,13 +131,13 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { ) )) { - towho->Message(0, "...%s is my owner. ", mob->GetName()); + towho->Message(Chat::White, "...%s is my owner. ", mob->GetName()); return; } if(mob == GetOwner()) { - towho->Message(0, "...%s a GM or is not connected. ", mob->GetName()); + towho->Message(Chat::White, "...%s a GM or is not connected. ", mob->GetName()); return; } @@ -145,7 +145,7 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { float iAggroRange2 = iAggroRange*iAggroRange; if( dist2 > iAggroRange2 ) { - towho->Message(0, "...%s is out of range. %.3f > %.3f ", mob->GetName(), + towho->Message(Chat::White, "...%s is out of range. %.3f > %.3f ", mob->GetName(), dist2, iAggroRange2); return; } @@ -154,14 +154,14 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { { if (GetLevel() < RuleI(Aggro, MinAggroLevel) && mob->GetLevelCon(GetLevel()) == CON_GRAY && GetBodyType() != 3) { - towho->Message(0, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2); + towho->Message(Chat::White, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2); return; } } else { if(GetINT() > RuleI(Aggro, IntAggroThreshold) && mob->GetLevelCon(GetLevel()) == CON_GRAY ) { - towho->Message(0, "...%s is red to me (basically)", mob->GetName(), + towho->Message(Chat::White, "...%s is red to me (basically)", mob->GetName(), dist2, iAggroRange2); return; } @@ -178,9 +178,9 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { mob_primary = own->GetPrimaryFaction(); if(mob_primary == 0) { - towho->Message(0, "...%s has no primary faction", mob->GetName()); + towho->Message(Chat::White, "...%s has no primary faction", mob->GetName()); } else if(mob_primary < 0) { - towho->Message(0, "...%s is on special faction %d", mob->GetName(), mob_primary); + towho->Message(Chat::White, "...%s is on special faction %d", mob->GetName(), mob_primary); } else { char namebuf[256]; if(!database.GetFactionName(mob_primary, namebuf, sizeof(namebuf))) @@ -193,22 +193,22 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { struct NPCFaction* fac = *cur; if ((int32)fac->factionID == mob_primary) { if (fac->npc_value > 0) { - towho->Message(0, "...%s is on ALLY faction %s (%d) with %d", mob->GetName(), namebuf, mob_primary, fac->npc_value); + towho->Message(Chat::White, "...%s is on ALLY faction %s (%d) with %d", mob->GetName(), namebuf, mob_primary, fac->npc_value); res = true; break; } else if (fac->npc_value < 0) { - towho->Message(0, "...%s is on ENEMY faction %s (%d) with %d", mob->GetName(), namebuf, mob_primary, fac->npc_value); + towho->Message(Chat::White, "...%s is on ENEMY faction %s (%d) with %d", mob->GetName(), namebuf, mob_primary, fac->npc_value); res = true; break; } else { - towho->Message(0, "...%s is on NEUTRAL faction %s (%d) with 0", mob->GetName(), namebuf, mob_primary); + towho->Message(Chat::White, "...%s is on NEUTRAL faction %s (%d) with 0", mob->GetName(), namebuf, mob_primary); res = true; break; } } } if(!res) { - towho->Message(0, "...%s is on faction %s (%d), which I have no entry for.", mob->GetName(), namebuf, mob_primary); + towho->Message(Chat::White, "...%s is on faction %s (%d), which I have no entry for.", mob->GetName(), namebuf, mob_primary); } } } @@ -222,18 +222,18 @@ void NPC::DescribeAggro(Client *towho, Mob *mob, bool verbose) { || fv == FACTION_THREATENLY )) { - towho->Message(0, "...%s faction not low enough. value='%s'", mob->GetName(), FactionValueToString(fv)); + towho->Message(Chat::White, "...%s faction not low enough. value='%s'", mob->GetName(), FactionValueToString(fv)); return; } if(fv == FACTION_THREATENLY) { - towho->Message(0, "...%s threatening to me, so they only have a %d chance per check of attacking.", mob->GetName()); + towho->Message(Chat::White, "...%s threatening to me, so they only have a %d chance per check of attacking.", mob->GetName()); } if(!CheckLosFN(mob)) { - towho->Message(0, "...%s is out of sight.", mob->GetName()); + towho->Message(Chat::White, "...%s is out of sight.", mob->GetName()); } - towho->Message(0, "...%s meets all conditions, I should be attacking them.", mob->GetName()); + towho->Message(Chat::White, "...%s meets all conditions, I should be attacking them.", mob->GetName()); } /* diff --git a/zone/bot.cpp b/zone/bot.cpp index daef58a9a..4398f2fd5 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -3256,7 +3256,7 @@ bool Bot::Spawn(Client* botCharacterOwner) { this->texture = 0; //0xFF; if(this->Save()) - this->GetBotOwner()->CastToClient()->Message(0, "%s saved.", this->GetCleanName()); + this->GetBotOwner()->CastToClient()->Message(Chat::White, "%s saved.", this->GetCleanName()); else this->GetBotOwner()->CastToClient()->Message(Chat::Red, "%s save failed!", this->GetCleanName()); @@ -5987,7 +5987,7 @@ bool Bot::ProcessGuildRemoval(Client* guildOfficer, std::string botName) { GuildManageRemove_Struct* gm = (GuildManageRemove_Struct*) outapp->pBuffer; gm->guildeqid = guildOfficer->GuildID(); strcpy(gm->member, botName.c_str()); - guildOfficer->Message(0, "%s successfully removed from your guild.", botName.c_str()); + guildOfficer->Message(Chat::White, "%s successfully removed from your guild.", botName.c_str()); entity_list.QueueClientsGuild(guildOfficer, outapp, false, gm->guildeqid); safe_delete(outapp); } @@ -8180,7 +8180,7 @@ void Bot::CalcBotStats(bool showtext) { } //if(this->Save()) - // this->GetBotOwner()->CastToClient()->Message(0, "%s saved.", this->GetCleanName()); + // this->GetBotOwner()->CastToClient()->Message(Chat::White, "%s saved.", this->GetCleanName()); //else // this->GetBotOwner()->CastToClient()->Message(Chat::Red, "%s save failed!", this->GetCleanName()); @@ -8868,7 +8868,7 @@ bool Bot::UseDiscipline(uint32 spell_id, uint32 target) { SetDisciplineRecastTimer(spells[spell_id].EndurTimerIndex, spell.recast_time); } else { uint32 remain = (GetDisciplineRemainingTime(this, spells[spell_id].EndurTimerIndex) / 1000); - GetOwner()->Message(0, "%s can use this discipline in %d minutes %d seconds.", GetCleanName(), (remain / 60), (remain % 60)); + GetOwner()->Message(Chat::White, "%s can use this discipline in %d minutes %d seconds.", GetCleanName(), (remain / 60), (remain % 60)); return false; } } diff --git a/zone/client.cpp b/zone/client.cpp index dfee9a340..bf2fb3a0d 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -3845,7 +3845,7 @@ void Client::SendRules(Client* client) auto lines = SplitString(rules, '\n'); for (auto&& e : lines) - client->Message(0, "%s", e.c_str()); + client->Message(Chat::White, "%s", e.c_str()); } void Client::SetEndurance(int32 newEnd) @@ -5748,7 +5748,7 @@ void Client::ProcessInspectRequest(Client* requestee, Client* requester) { strcpy(insr->text, requestee->GetInspectMessage().text); // There could be an OP for this..or not... (Ti clients are not processed here..this message is generated client-side) - if(requestee->IsClient() && (requestee != requester)) { requestee->Message(0, "%s is looking at your equipment...", requester->GetName()); } + if(requestee->IsClient() && (requestee != requester)) { requestee->Message(Chat::White, "%s is looking at your equipment...", requester->GetName()); } requester->QueuePacket(outapp); // Send answer to requester safe_delete(outapp); @@ -6855,30 +6855,30 @@ void Client::SendStatsWindow(Client* client, bool use_window) } client->Message(Chat::Yellow, "~~~~~ %s %s ~~~~~", GetCleanName(), GetLastName()); - client->Message(0, " Level: %i Class: %i Race: %i DS: %i/%i Size: %1.1f Weight: %.1f/%d ", GetLevel(), GetClass(), GetRace(), GetDS(), RuleI(Character, ItemDamageShieldCap), GetSize(), (float)CalcCurrentWeight() / 10.0f, GetSTR()); - client->Message(0, " HP: %i/%i HP Regen: %i/%i",GetHP(), GetMaxHP(), CalcHPRegen(), CalcHPRegenCap()); - client->Message(0, " compute_tohit: %i TotalToHit: %i", compute_tohit(skill), GetTotalToHit(skill, 0)); - client->Message(0, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense()); - client->Message(0, " offense: %i mitigation ac: %i", offense(skill), GetMitigationAC()); + client->Message(Chat::White, " Level: %i Class: %i Race: %i DS: %i/%i Size: %1.1f Weight: %.1f/%d ", GetLevel(), GetClass(), GetRace(), GetDS(), RuleI(Character, ItemDamageShieldCap), GetSize(), (float)CalcCurrentWeight() / 10.0f, GetSTR()); + client->Message(Chat::White, " HP: %i/%i HP Regen: %i/%i",GetHP(), GetMaxHP(), CalcHPRegen(), CalcHPRegenCap()); + client->Message(Chat::White, " compute_tohit: %i TotalToHit: %i", compute_tohit(skill), GetTotalToHit(skill, 0)); + client->Message(Chat::White, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense()); + client->Message(Chat::White, " offense: %i mitigation ac: %i", offense(skill), GetMitigationAC()); if(CalcMaxMana() > 0) - client->Message(0, " Mana: %i/%i Mana Regen: %i/%i", GetMana(), GetMaxMana(), CalcManaRegen(), CalcManaRegenCap()); - client->Message(0, " End.: %i/%i End. Regen: %i/%i",GetEndurance(), GetMaxEndurance(), CalcEnduranceRegen(), CalcEnduranceRegenCap()); - client->Message(0, " ATK: %i Worn/Spell ATK %i/%i Server Side ATK: %i", GetTotalATK(), RuleI(Character, ItemATKCap), GetATKBonus(), GetATK()); - client->Message(0, " Haste: %i / %i (Item: %i + Spell: %i + Over: %i)", GetHaste(), RuleI(Character, HasteCap), itembonuses.haste, spellbonuses.haste + spellbonuses.hastetype2, spellbonuses.hastetype3 + ExtraHaste); - client->Message(0, " STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA()); - client->Message(0, " hSTR: %i hSTA: %i hDEX: %i hAGI: %i hINT: %i hWIS: %i hCHA: %i", GetHeroicSTR(), GetHeroicSTA(), GetHeroicDEX(), GetHeroicAGI(), GetHeroicINT(), GetHeroicWIS(), GetHeroicCHA()); - client->Message(0, " MR: %i PR: %i FR: %i CR: %i DR: %i Corruption: %i PhR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR(), GetCorrup(), GetPhR()); - client->Message(0, " hMR: %i hPR: %i hFR: %i hCR: %i hDR: %i hCorruption: %i", GetHeroicMR(), GetHeroicPR(), GetHeroicFR(), GetHeroicCR(), GetHeroicDR(), GetHeroicCorrup()); - client->Message(0, " Shielding: %i Spell Shield: %i DoT Shielding: %i Stun Resist: %i Strikethrough: %i Avoidance: %i Accuracy: %i Combat Effects: %i", GetShielding(), GetSpellShield(), GetDoTShield(), GetStunResist(), GetStrikeThrough(), GetAvoidance(), GetAccuracy(), GetCombatEffects()); - client->Message(0, " Heal Amt.: %i Spell Dmg.: %i Clairvoyance: %i DS Mitigation: %i", GetHealAmt(), GetSpellDmg(), GetClair(), GetDSMit()); + client->Message(Chat::White, " Mana: %i/%i Mana Regen: %i/%i", GetMana(), GetMaxMana(), CalcManaRegen(), CalcManaRegenCap()); + client->Message(Chat::White, " End.: %i/%i End. Regen: %i/%i",GetEndurance(), GetMaxEndurance(), CalcEnduranceRegen(), CalcEnduranceRegenCap()); + client->Message(Chat::White, " ATK: %i Worn/Spell ATK %i/%i Server Side ATK: %i", GetTotalATK(), RuleI(Character, ItemATKCap), GetATKBonus(), GetATK()); + client->Message(Chat::White, " Haste: %i / %i (Item: %i + Spell: %i + Over: %i)", GetHaste(), RuleI(Character, HasteCap), itembonuses.haste, spellbonuses.haste + spellbonuses.hastetype2, spellbonuses.hastetype3 + ExtraHaste); + client->Message(Chat::White, " STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA()); + client->Message(Chat::White, " hSTR: %i hSTA: %i hDEX: %i hAGI: %i hINT: %i hWIS: %i hCHA: %i", GetHeroicSTR(), GetHeroicSTA(), GetHeroicDEX(), GetHeroicAGI(), GetHeroicINT(), GetHeroicWIS(), GetHeroicCHA()); + client->Message(Chat::White, " MR: %i PR: %i FR: %i CR: %i DR: %i Corruption: %i PhR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR(), GetCorrup(), GetPhR()); + client->Message(Chat::White, " hMR: %i hPR: %i hFR: %i hCR: %i hDR: %i hCorruption: %i", GetHeroicMR(), GetHeroicPR(), GetHeroicFR(), GetHeroicCR(), GetHeroicDR(), GetHeroicCorrup()); + client->Message(Chat::White, " Shielding: %i Spell Shield: %i DoT Shielding: %i Stun Resist: %i Strikethrough: %i Avoidance: %i Accuracy: %i Combat Effects: %i", GetShielding(), GetSpellShield(), GetDoTShield(), GetStunResist(), GetStrikeThrough(), GetAvoidance(), GetAccuracy(), GetCombatEffects()); + client->Message(Chat::White, " Heal Amt.: %i Spell Dmg.: %i Clairvoyance: %i DS Mitigation: %i", GetHealAmt(), GetSpellDmg(), GetClair(), GetDSMit()); if(GetClass() == BARD) - client->Message(0, " Singing: %i Brass: %i String: %i Percussion: %i Wind: %i", GetSingMod(), GetBrassMod(), GetStringMod(), GetPercMod(), GetWindMod()); + client->Message(Chat::White, " Singing: %i Brass: %i String: %i Percussion: %i Wind: %i", GetSingMod(), GetBrassMod(), GetStringMod(), GetPercMod(), GetWindMod()); Extra_Info: - client->Message(0, " BaseRace: %i Gender: %i BaseGender: %i Texture: %i HelmTexture: %i", GetBaseRace(), GetGender(), GetBaseGender(), GetTexture(), GetHelmTexture()); + client->Message(Chat::White, " BaseRace: %i Gender: %i BaseGender: %i Texture: %i HelmTexture: %i", GetBaseRace(), GetGender(), GetBaseGender(), GetTexture(), GetHelmTexture()); if (client->Admin() >= 100) { - client->Message(0, " CharID: %i EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", CharacterID(), GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted); + client->Message(Chat::White, " CharID: %i EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", CharacterID(), GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted); } } @@ -7248,17 +7248,17 @@ void Client::ShowXTargets(Client *c) return; for(int i = 0; i < GetMaxXTargets(); ++i) - c->Message(0, "Xtarget Slot: %i, Type: %2i, ID: %4i, Name: %s", i, XTargets[i].Type, XTargets[i].ID, XTargets[i].Name); + c->Message(Chat::White, "Xtarget Slot: %i, Type: %2i, ID: %4i, Name: %s", i, XTargets[i].Type, XTargets[i].ID, XTargets[i].Name); auto &list = GetXTargetAutoMgr()->get_list(); // yeah, I kept having to do something for debugging to tell if managers were the same object or not :P // so lets use the address as an "ID" - c->Message(0, "XTargetAutoMgr ID %p size %d", GetXTargetAutoMgr(), list.size()); + c->Message(Chat::White, "XTargetAutoMgr ID %p size %d", GetXTargetAutoMgr(), list.size()); int count = 0; for (auto &e : list) { - c->Message(0, "spawn id %d count %d", e.spawn_id, e.count); + c->Message(Chat::White, "spawn id %d count %d", e.spawn_id, e.count); count++; if (count == 20) { // lets not spam too many ... - c->Message(0, " ... "); + c->Message(Chat::White, " ... "); break; } } diff --git a/zone/command.cpp b/zone/command.cpp index cf6cc6d6b..5ee0f1b1c 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -672,9 +672,9 @@ void command_setstat(Client* c, const Seperator* sep){ c->GetTarget()->CastToClient()->SetStats(atoi(sep->arg[1]),atoi(sep->arg[2])); } else{ - c->Message(0,"This command is used to permanently increase or decrease a players stats."); - c->Message(0,"Usage: #setstat {type} {value the stat should be}"); - c->Message(0,"Types: Str: 0, Sta: 1, Agi: 2, Dex: 3, Int: 4, Wis: 5, Cha: 6"); + c->Message(Chat::White,"This command is used to permanently increase or decrease a players stats."); + c->Message(Chat::White,"Usage: #setstat {type} {value the stat should be}"); + c->Message(Chat::White,"Types: Str: 0, Sta: 1, Agi: 2, Dex: 3, Int: 4, Wis: 5, Cha: 6"); } } @@ -683,10 +683,10 @@ void command_incstat(Client* c, const Seperator* sep){ c->GetTarget()->CastToClient()->IncStats(atoi(sep->arg[1]),atoi(sep->arg[2])); } else{ - c->Message(0,"This command is used to permanently increase or decrease a players stats."); - c->Message(0,"Usage: #setstat {type} {value by which to increase or decrease}"); - c->Message(0,"Note: The value is in increments of 2, so a value of 3 will actually increase the stat by 6"); - c->Message(0,"Types: Str: 0, Sta: 1, Agi: 2, Dex: 3, Int: 4, Wis: 5, Cha: 6"); + c->Message(Chat::White,"This command is used to permanently increase or decrease a players stats."); + c->Message(Chat::White,"Usage: #setstat {type} {value by which to increase or decrease}"); + c->Message(Chat::White,"Note: The value is in increments of 2, so a value of 3 will actually increase the stat by 6"); + c->Message(Chat::White,"Types: Str: 0, Sta: 1, Agi: 2, Dex: 3, Int: 4, Wis: 5, Cha: 6"); } } @@ -696,14 +696,14 @@ void command_resetaa(Client* c,const Seperator *sep) { c->Message(Chat::Red,"Successfully reset %s's AAs", c->GetTarget()->GetName()); } else - c->Message(0,"Usage: Target a client and use #resetaa to reset the AA data in their Profile."); + c->Message(Chat::White,"Usage: Target a client and use #resetaa to reset the AA data in their Profile."); } void command_help(Client *c, const Seperator *sep) { int commands_shown=0; - c->Message(0, "Available EQEMu commands:"); + c->Message(Chat::White, "Available EQEMu commands:"); std::map::iterator cur,end; cur = commandlist.begin(); @@ -719,24 +719,24 @@ void command_help(Client *c, const Seperator *sep) if(c->Admin() < cur->second->access) continue; commands_shown++; - c->Message(0, " %c%s %s", COMMAND_CHAR, cur->first.c_str(), cur->second->desc == nullptr?"":cur->second->desc); + c->Message(Chat::White, " %c%s %s", COMMAND_CHAR, cur->first.c_str(), cur->second->desc == nullptr?"":cur->second->desc); } - c->Message(0, "%d command%s listed.", commands_shown, commands_shown!=1?"s":""); + c->Message(Chat::White, "%d command%s listed.", commands_shown, commands_shown!=1?"s":""); } void command_version(Client *c, const Seperator *sep) { - c->Message(0, "Current version information."); - c->Message(0, " %s", CURRENT_VERSION); - c->Message(0, " Compiled on: %s at %s", COMPILE_DATE, COMPILE_TIME); - c->Message(0, " Last modified on: %s", LAST_MODIFIED); + c->Message(Chat::White, "Current version information."); + c->Message(Chat::White, " %s", CURRENT_VERSION); + c->Message(Chat::White, " Compiled on: %s at %s", COMPILE_DATE, COMPILE_TIME); + c->Message(Chat::White, " Last modified on: %s", LAST_MODIFIED); } void command_setfaction(Client *c, const Seperator *sep) { if((sep->arg[1][0] == 0 || strcasecmp(sep->arg[1],"*")==0) || ((c->GetTarget()==0) || (c->GetTarget()->IsClient()))) { - c->Message(0, "Usage: #setfaction [faction number]"); + c->Message(Chat::White, "Usage: #setfaction [faction number]"); return; } @@ -751,9 +751,9 @@ void command_setfaction(Client *c, const Seperator *sep) void command_serversidename(Client *c, const Seperator *sep) { if(c->GetTarget()) - c->Message(0, c->GetTarget()->GetName()); + c->Message(Chat::White, c->GetTarget()->GetName()); else - c->Message(0, "Error: no target"); + c->Message(Chat::White, "Error: no target"); } void command_wc(Client *c, const Seperator *sep) @@ -801,7 +801,7 @@ void command_wc(Client *c, const Seperator *sep) void command_heromodel(Client *c, const Seperator *sep) { if (sep->argnum < 1) { - c->Message(0, "Usage: #heromodel [hero forge model] [ [slot] ] (example: #heromodel 63)"); + c->Message(Chat::White, "Usage: #heromodel [hero forge model] [ [slot] ] (example: #heromodel 63)"); } else if (c->GetTarget() == nullptr) { c->Message(Chat::Red, "You must have a target to do a wear change for Hero's Forge Models."); @@ -836,12 +836,12 @@ void command_setanim(Client *c, const Seperator *sep) if (c->GetTarget() && sep->IsNumber(1)) { int num = atoi(sep->arg[1]); if (num < 0 || num >= _eaMaxAppearance) { - c->Message(0, "Invalid animation number, between 0 and %d", _eaMaxAppearance - 1); + c->Message(Chat::White, "Invalid animation number, between 0 and %d", _eaMaxAppearance - 1); } c->GetTarget()->SetAppearance(EmuAppearance(num)); } else { - c->Message(0, "Usage: #setanim [animnum]"); + c->Message(Chat::White, "Usage: #setanim [animnum]"); } } @@ -853,50 +853,50 @@ void command_serverinfo(Client *c, const Seperator *sep) auto rss = EQ::GetRSS(); auto uptime = EQ::GetUptime(); - c->Message(0, "Operating System Information"); - c->Message(0, "=================================================="); - c->Message(0, "System: %s", os.sysname.c_str()); - c->Message(0, "Release: %s", os.release.c_str()); - c->Message(0, "Version: %s", os.version.c_str()); - c->Message(0, "Machine: %s", os.machine.c_str()); - c->Message(0, "Uptime: %.2f seconds", uptime); - c->Message(0, "=================================================="); - c->Message(0, "CPU Information"); - c->Message(0, "=================================================="); + c->Message(Chat::White, "Operating System Information"); + c->Message(Chat::White, "=================================================="); + c->Message(Chat::White, "System: %s", os.sysname.c_str()); + c->Message(Chat::White, "Release: %s", os.release.c_str()); + c->Message(Chat::White, "Version: %s", os.version.c_str()); + c->Message(Chat::White, "Machine: %s", os.machine.c_str()); + c->Message(Chat::White, "Uptime: %.2f seconds", uptime); + c->Message(Chat::White, "=================================================="); + c->Message(Chat::White, "CPU Information"); + c->Message(Chat::White, "=================================================="); for (size_t i = 0; i < cpus.size(); ++i) { auto &cp = cpus[i]; - c->Message(0, "CPU #%i: %s, Speed: %.2fGhz", i, cp.model.c_str(), cp.speed); + c->Message(Chat::White, "CPU #%i: %s, Speed: %.2fGhz", i, cp.model.c_str(), cp.speed); } - c->Message(0, "=================================================="); - c->Message(0, "Process Information"); - c->Message(0, "=================================================="); - c->Message(0, "PID: %u", pid); - c->Message(0, "RSS: %.2f MB", rss / 1048576.0); - c->Message(0, "=================================================="); + c->Message(Chat::White, "=================================================="); + c->Message(Chat::White, "Process Information"); + c->Message(Chat::White, "=================================================="); + c->Message(Chat::White, "PID: %u", pid); + c->Message(Chat::White, "RSS: %.2f MB", rss / 1048576.0); + c->Message(Chat::White, "=================================================="); } void command_getvariable(Client *c, const Seperator *sep) { std::string tmp; if (database.GetVariable(sep->argplus[1], tmp)) - c->Message(0, "%s = %s", sep->argplus[1], tmp.c_str()); + c->Message(Chat::White, "%s = %s", sep->argplus[1], tmp.c_str()); else - c->Message(0, "GetVariable(%s) returned false", sep->argplus[1]); + c->Message(Chat::White, "GetVariable(%s) returned false", sep->argplus[1]); } void command_chat(Client *c, const Seperator *sep) { if (sep->arg[2][0] == 0) - c->Message(0, "Usage: #chat [channum] [message]"); + c->Message(Chat::White, "Usage: #chat [channum] [message]"); else if (!worldserver.SendChannelMessage(0, 0, (uint8) atoi(sep->arg[1]), 0, 0, 100, sep->argplus[2])) - c->Message(0, "Error: World server disconnected"); + c->Message(Chat::White, "Error: World server disconnected"); } void command_npcloot(Client *c, const Seperator *sep) { if (c->GetTarget() == 0) - c->Message(0, "Error: No target"); + c->Message(Chat::White, "Error: No target"); // #npcloot show else if (strcasecmp(sep->arg[1], "show") == 0) { @@ -905,11 +905,11 @@ void command_npcloot(Client *c, const Seperator *sep) else if (c->GetTarget()->IsCorpse()) c->GetTarget()->CastToCorpse()->QueryLoot(c); else - c->Message(0, "Error: Target's type doesnt have loot"); + c->Message(Chat::White, "Error: Target's type doesnt have loot"); } // These 2 types are *BAD* for the next few commands else if (c->GetTarget()->IsClient() || c->GetTarget()->IsCorpse()) - c->Message(0, "Error: Invalid target type, try a NPC =)."); + c->Message(Chat::White, "Error: Invalid target type, try a NPC =)."); // #npcloot add else if (strcasecmp(sep->arg[1], "add") == 0) { @@ -923,22 +923,22 @@ void command_npcloot(Client *c, const Seperator *sep) c->GetTarget()->CastToNPC()->AddItem(item, atoi(sep->arg[3]), 0); else c->GetTarget()->CastToNPC()->AddItem(item, 1, 0); - c->Message(0, "Added item(%i) to the %s's loot.", item, c->GetTarget()->GetName()); + c->Message(Chat::White, "Added item(%i) to the %s's loot.", item, c->GetTarget()->GetName()); } else - c->Message(0, "Error: #npcloot add: Item(%i) does not exist!", item); + c->Message(Chat::White, "Error: #npcloot add: Item(%i) does not exist!", item); } else if (!sep->IsNumber(2)) - c->Message(0, "Error: #npcloot add: Itemid must be a number."); + c->Message(Chat::White, "Error: #npcloot add: Itemid must be a number."); else - c->Message(0, "Error: #npcloot add: This is not a valid target."); + c->Message(Chat::White, "Error: #npcloot add: This is not a valid target."); } // #npcloot remove else if (strcasecmp(sep->arg[1], "remove") == 0) { //#npcloot remove all if (strcasecmp(sep->arg[2], "all") == 0) - c->Message(0, "Error: #npcloot remove all: Not yet implemented."); + c->Message(Chat::White, "Error: #npcloot remove all: Not yet implemented."); //#npcloot remove itemid else { @@ -946,12 +946,12 @@ void command_npcloot(Client *c, const Seperator *sep) { uint32 item = atoi(sep->arg[2]); c->GetTarget()->CastToNPC()->RemoveItem(item); - c->Message(0, "Removed item(%i) from the %s's loot.", item, c->GetTarget()->GetName()); + c->Message(Chat::White, "Removed item(%i) from the %s's loot.", item, c->GetTarget()->GetName()); } else if (!sep->IsNumber(2)) - c->Message(0, "Error: #npcloot remove: Item must be a number."); + c->Message(Chat::White, "Error: #npcloot remove: Item must be a number."); else - c->Message(0, "Error: #npcloot remove: This is not a valid target."); + c->Message(Chat::White, "Error: #npcloot remove: This is not a valid target."); } } // #npcloot money @@ -962,16 +962,16 @@ void command_npcloot(Client *c, const Seperator *sep) if ((atoi(sep->arg[2]) < 34465 && atoi(sep->arg[2]) >= 0) && (atoi(sep->arg[3]) < 34465 && atoi(sep->arg[3]) >= 0) && (atoi(sep->arg[4]) < 34465 && atoi(sep->arg[4]) >= 0) && (atoi(sep->arg[5]) < 34465 && atoi(sep->arg[5]) >= 0)) { c->GetTarget()->CastToNPC()->AddCash(atoi(sep->arg[5]), atoi(sep->arg[4]), atoi(sep->arg[3]), atoi(sep->arg[2])); - c->Message(0, "Set %i Platinum, %i Gold, %i Silver, and %i Copper as %s's money.", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), c->GetTarget()->GetName()); + c->Message(Chat::White, "Set %i Platinum, %i Gold, %i Silver, and %i Copper as %s's money.", atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), c->GetTarget()->GetName()); } else - c->Message(0, "Error: #npcloot money: Values must be between 0-34465."); + c->Message(Chat::White, "Error: #npcloot money: Values must be between 0-34465."); } else - c->Message(0, "Usage: #npcloot money platinum gold silver copper"); + c->Message(Chat::White, "Usage: #npcloot money platinum gold silver copper"); } else - c->Message(0, "Usage: #npcloot [show/money/add/remove] [itemid/all/money: pp gp sp cp]"); + c->Message(Chat::White, "Usage: #npcloot [show/money/add/remove] [itemid/all/money: pp gp sp cp]"); } void command_gm(Client *c, const Seperator *sep) @@ -984,10 +984,10 @@ void command_gm(Client *c, const Seperator *sep) if(sep->arg[1][0] != 0) { t->SetGM(state); - c->Message(0, "%s is %s a GM.", t->GetName(), state?"now":"no longer"); + c->Message(Chat::White, "%s is %s a GM.", t->GetName(), state?"now":"no longer"); } else - c->Message(0, "Usage: #gm [on/off]"); + c->Message(Chat::White, "Usage: #gm [on/off]"); } // there's no need for this, as /summon already takes care of it @@ -1009,11 +1009,11 @@ void command_summon(Client *c, const Seperator *sep) else { if (!worldserver.Connected()) - c->Message(0, "Error: World server disconnected."); + c->Message(Chat::White, "Error: World server disconnected."); else { // player is in another zone //Taking this command out until we test the factor of 8 in ServerOP_ZonePlayer - //c->Message(0, "Summoning player from another zone not yet implemented."); + //c->Message(Chat::White, "Summoning player from another zone not yet implemented."); //return; auto pack = new ServerPacket(ServerOP_ZonePlayer, sizeof(ServerZonePlayer_Struct)); @@ -1038,9 +1038,9 @@ void command_summon(Client *c, const Seperator *sep) else { /*if(c->Admin() < 150) - c->Message(0, "You need a NPC/corpse target for this command"); + c->Message(Chat::White, "You need a NPC/corpse target for this command"); else*/ - c->Message(0, "Usage: #summon [charname] Either target or charname is required"); + c->Message(Chat::White, "Usage: #summon [charname] Either target or charname is required"); return; } @@ -1049,23 +1049,23 @@ void command_summon(Client *c, const Seperator *sep) if (t->IsNPC()) { // npc target - c->Message(0, "Summoning NPC %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ()); + c->Message(Chat::White, "Summoning NPC %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ()); t->CastToNPC()->GMMove(c->GetX(), c->GetY(), c->GetZ(), c->GetHeading()); t->CastToNPC()->SaveGuardSpot(glm::vec4(0.0f)); } else if (t->IsCorpse()) { // corpse target - c->Message(0, "Summoning corpse %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ()); + c->Message(Chat::White, "Summoning corpse %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ()); t->CastToCorpse()->GMMove(c->GetX(), c->GetY(), c->GetZ(), c->GetHeading()); } else if (t->IsClient()) { /*if(c->Admin() < 150) { - c->Message(0, "You may not summon a player."); + c->Message(Chat::White, "You may not summon a player."); return; }*/ - c->Message(0, "Summoning player %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ()); + c->Message(Chat::White, "Summoning player %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ()); t->CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), c->GetX(), c->GetY(), c->GetZ(), c->GetHeading(), 2, GMSummon); } } @@ -1074,7 +1074,7 @@ void command_zone(Client *c, const Seperator *sep) { if(c->Admin() < commandZoneToCoords && (sep->IsNumber(2) || sep->IsNumber(3) || sep->IsNumber(4))) { - c->Message(0, "Your status is not high enough to zone to specific coordinates."); + c->Message(Chat::White, "Your status is not high enough to zone to specific coordinates."); return; } @@ -1083,29 +1083,29 @@ void command_zone(Client *c, const Seperator *sep) if (sep->IsNumber(1)) { if(atoi(sep->arg[1])==26 && (c->Admin() < commandZoneToSpecials)){ //cshome - c->Message(0, "Only Guides and above can goto that zone."); + c->Message(Chat::White, "Only Guides and above can goto that zone."); return; } zoneid = atoi(sep->arg[1]); } else if (sep->arg[1][0] == 0) { - c->Message(0, "Usage: #zone [zonename]"); - c->Message(0, "Optional Usage: #zone [zonename] y x z"); + c->Message(Chat::White, "Usage: #zone [zonename]"); + c->Message(Chat::White, "Optional Usage: #zone [zonename] y x z"); return; } else if (zone->GetZoneID() == 184 && c->Admin() < commandZoneToSpecials) { // Zone: 'Load' - c->Message(0, "The Gods brought you here, only they can send you away."); + c->Message(Chat::White, "The Gods brought you here, only they can send you away."); return; } else { if((strcasecmp(sep->arg[1], "cshome")==0) && (c->Admin() < commandZoneToSpecials)){ - c->Message(0, "Only Guides and above can goto that zone."); + c->Message(Chat::White, "Only Guides and above can goto that zone."); return; } zoneid = database.GetZoneID(sep->arg[1]); if(zoneid == 0) { - c->Message(0, "Unable to locate zone '%s'", sep->arg[1]); + c->Message(Chat::White, "Unable to locate zone '%s'", sep->arg[1]); return; } } @@ -1130,14 +1130,14 @@ void command_zone_instance(Client *c, const Seperator *sep) { if(c->Admin() < commandZoneToCoords && (sep->IsNumber(2) || sep->IsNumber(3) || sep->IsNumber(4))) { - c->Message(0, "Your status is not high enough to zone to specific coordinates."); + c->Message(Chat::White, "Your status is not high enough to zone to specific coordinates."); return; } if (sep->arg[1][0] == 0) { - c->Message(0, "Usage: #zoneinstance [instance id]"); - c->Message(0, "Optional Usage: #zoneinstance [instance id] y x z"); + c->Message(Chat::White, "Usage: #zoneinstance [instance id]"); + c->Message(Chat::White, "Optional Usage: #zoneinstance [instance id] y x z"); return; } @@ -1149,26 +1149,26 @@ void command_zone_instance(Client *c, const Seperator *sep) instanceid = atoi(sep->arg[1]); if(!instanceid) { - c->Message(0, "Must enter a valid instance id."); + c->Message(Chat::White, "Must enter a valid instance id."); return; } zoneid = database.ZoneIDFromInstanceID(instanceid); if(!zoneid) { - c->Message(0, "Instance not found or zone is set to null."); + c->Message(Chat::White, "Instance not found or zone is set to null."); return; } } else { - c->Message(0, "Must enter a valid instance id."); + c->Message(Chat::White, "Must enter a valid instance id."); return; } if(!database.VerifyInstanceAlive(instanceid, c->CharacterID())) { - c->Message(0, "Instance ID expiried or you are not apart of this instance."); + c->Message(Chat::White, "Instance ID expiried or you are not apart of this instance."); return; } @@ -1199,7 +1199,7 @@ void command_peqzone(Client *c, const Seperator *sep) } if(c->GetHPRatio() < 75) { - c->Message(0, "You cannot use this command with less than 75 percent health."); + c->Message(Chat::White, "You cannot use this command with less than 75 percent health."); return; } @@ -1212,7 +1212,7 @@ void command_peqzone(Client *c, const Seperator *sep) || c->AutoAttackEnabled() || c->GetInvul() ) { - c->Message(0, "You cannot use this command in your current state. Settle down and wait."); + c->Message(Chat::White, "You cannot use this command in your current state. Settle down and wait."); return; } @@ -1233,15 +1233,15 @@ void command_peqzone(Client *c, const Seperator *sep) } else if (sep->arg[1][0] == 0 || sep->IsNumber(2) || sep->IsNumber(3) || sep->IsNumber(4) || sep->IsNumber(5)) { - c->Message(0, "Usage: #peqzone [zonename]"); - c->Message(0, "Optional Usage: #peqzone [zoneid]"); + c->Message(Chat::White, "Usage: #peqzone [zonename]"); + c->Message(Chat::White, "Optional Usage: #peqzone [zoneid]"); return; } else { zoneid = database.GetZoneID(sep->arg[1]); destzone = database.GetPEQZone(zoneid, 0); if(zoneid == 0) { - c->Message(0, "Unable to locate zone '%s'", sep->arg[1]); + c->Message(Chat::White, "Unable to locate zone '%s'", sep->arg[1]); return; } if(destzone == 0){ @@ -1267,9 +1267,9 @@ void command_peqzone(Client *c, const Seperator *sep) void command_movechar(Client *c, const Seperator *sep) { if(sep->arg[1][0]==0 || sep->arg[2][0] == 0) - c->Message(0, "Usage: #movechar [charactername] [zonename]"); + c->Message(Chat::White, "Usage: #movechar [charactername] [zonename]"); else if (c->Admin() < commandMovecharToSpecials && strcasecmp(sep->arg[2], "cshome") == 0 || strcasecmp(sep->arg[2], "load") == 0 || strcasecmp(sep->arg[2], "load2") == 0) - c->Message(0, "Invalid zone name"); + c->Message(Chat::White, "Invalid zone name"); else { uint32 tmp = database.GetAccountIDByChar(sep->arg[1]); @@ -1277,14 +1277,14 @@ void command_movechar(Client *c, const Seperator *sep) { if (c->Admin() >= commandMovecharSelfOnly || tmp == c->AccountID()) if (!database.MoveCharacterToZone((char*) sep->arg[1], (char*) sep->arg[2])) - c->Message(0, "Character Move Failed!"); + c->Message(Chat::White, "Character Move Failed!"); else - c->Message(0, "Character has been moved."); + c->Message(Chat::White, "Character has been moved."); else c->Message(Chat::Red,"You cannot move characters that are not on your account."); } else - c->Message(0, "Character Does Not Exist"); + c->Message(Chat::White, "Character Does Not Exist"); } } @@ -1293,7 +1293,7 @@ void command_movement(Client *c, const Seperator *sep) auto &mgr = MobMovementManager::Get(); if (sep->arg[1][0] == 0) { - c->Message(0, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop/packet"); + c->Message(Chat::White, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop/packet"); return; } @@ -1309,7 +1309,7 @@ void command_movement(Client *c, const Seperator *sep) { auto target = c->GetTarget(); if (target == nullptr) { - c->Message(0, "No target found."); + c->Message(Chat::White, "No target found."); return; } @@ -1319,7 +1319,7 @@ void command_movement(Client *c, const Seperator *sep) { auto target = c->GetTarget(); if (target == nullptr) { - c->Message(0, "No target found."); + c->Message(Chat::White, "No target found."); return; } @@ -1329,7 +1329,7 @@ void command_movement(Client *c, const Seperator *sep) { auto target = c->GetTarget(); if (target == nullptr) { - c->Message(0, "No target found."); + c->Message(Chat::White, "No target found."); return; } @@ -1339,7 +1339,7 @@ void command_movement(Client *c, const Seperator *sep) { auto target = c->GetTarget(); if (target == nullptr) { - c->Message(0, "No target found."); + c->Message(Chat::White, "No target found."); return; } @@ -1349,21 +1349,21 @@ void command_movement(Client *c, const Seperator *sep) { auto target = c->GetTarget(); if (target == nullptr) { - c->Message(0, "No target found."); + c->Message(Chat::White, "No target found."); return; } mgr.SendCommandToClients(target, atof(sep->arg[2]), atof(sep->arg[3]), atof(sep->arg[4]), atof(sep->arg[5]), atoi(sep->arg[6]), ClientRangeAny); } else { - c->Message(0, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop/packet"); + c->Message(Chat::White, "Usage: #movement stats/clearstats/walkto/runto/rotateto/stop/packet"); } } void command_viewpetition(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) { - c->Message(0, "Usage: #viewpetition (petition number) Type #listpetition for a list"); + c->Message(Chat::White, "Usage: #viewpetition (petition number) Type #listpetition for a list"); return; } @@ -1390,7 +1390,7 @@ void command_viewpetition(Client *c, const Seperator *sep) void command_petitioninfo(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) { - c->Message(0, "Usage: #petitioninfo (petition number) Type #listpetition for a list"); + c->Message(Chat::White, "Usage: #petitioninfo (petition number) Type #listpetition for a list"); return; } @@ -1415,7 +1415,7 @@ void command_petitioninfo(Client *c, const Seperator *sep) void command_delpetition(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0 || strcasecmp(sep->arg[1],"*") == 0) { - c->Message(0, "Usage: #delpetition (petition number) Type #listpetition for a list"); + c->Message(Chat::White, "Usage: #delpetition (petition number) Type #listpetition for a list"); return; } @@ -1431,7 +1431,7 @@ void command_delpetition(Client *c, const Seperator *sep) void command_listnpcs(Client *c, const Seperator *sep) { - c->Message(0, "Deprecated, use the #list command (#list npcs )"); + c->Message(Chat::White, "Deprecated, use the #list command (#list npcs )"); } void command_list(Client *c, const Seperator *sep) @@ -1688,9 +1688,9 @@ void command_list(Client *c, const Seperator *sep) } } else { - c->Message(0, "Usage of #list"); - c->Message(0, "- #list [npcs|players|corpses|doors|objects] [search]"); - c->Message(0, "- Example: #list npc (Blank for all)"); + c->Message(Chat::White, "Usage of #list"); + c->Message(Chat::White, "- #list [npcs|players|corpses|doors|objects] [search]"); + c->Message(Chat::White, "- Example: #list npc (Blank for all)"); } } @@ -1752,10 +1752,10 @@ void command_invul(Client *c, const Seperator *sep) if(sep->arg[1][0] != 0) { t->SetInvul(state); - c->Message(0, "%s is %s invulnerable from attack.", t->GetName(), state?"now":"no longer"); + c->Message(Chat::White, "%s is %s invulnerable from attack.", t->GetName(), state?"now":"no longer"); } else - c->Message(0, "Usage: #invulnerable [on/off]"); + c->Message(Chat::White, "Usage: #invulnerable [on/off]"); } void command_hideme(Client *c, const Seperator *sep) @@ -1763,7 +1763,7 @@ void command_hideme(Client *c, const Seperator *sep) bool state=atobool(sep->arg[1]); if(sep->arg[1][0]==0) - c->Message(0, "Usage: #hideme [on/off]"); + c->Message(Chat::White, "Usage: #hideme [on/off]"); else { c->SetHideMe(state); @@ -1774,7 +1774,7 @@ void command_hideme(Client *c, const Seperator *sep) void command_emote(Client *c, const Seperator *sep) { if (sep->arg[3][0] == 0) - c->Message(0, "Usage: #emote [name | world | zone] type# message"); + c->Message(Chat::White, "Usage: #emote [name | world | zone] type# message"); else { if (strcasecmp(sep->arg[1], "zone") == 0){ char* newmessage=0; @@ -1786,7 +1786,7 @@ void command_emote(Client *c, const Seperator *sep) } } else if (!worldserver.Connected()) - c->Message(0, "Error: World server disconnected"); + c->Message(Chat::White, "Error: World server disconnected"); else if (strcasecmp(sep->arg[1], "world") == 0) worldserver.SendEmoteMessage(0, 0, atoi(sep->arg[2]), sep->argplus[3]); else @@ -1798,42 +1798,42 @@ void command_fov(Client *c, const Seperator *sep) { if(c->GetTarget()) if(c->BehindMob(c->GetTarget(), c->GetX(), c->GetY())) - c->Message(0, "You are behind mob %s, it is looking to %d", c->GetTarget()->GetName(), c->GetTarget()->GetHeading()); + c->Message(Chat::White, "You are behind mob %s, it is looking to %d", c->GetTarget()->GetName(), c->GetTarget()->GetHeading()); else - c->Message(0, "You are NOT behind mob %s, it is looking to %d", c->GetTarget()->GetName(), c->GetTarget()->GetHeading()); + c->Message(Chat::White, "You are NOT behind mob %s, it is looking to %d", c->GetTarget()->GetName(), c->GetTarget()->GetHeading()); else - c->Message(0, "I Need a target!"); + c->Message(Chat::White, "I Need a target!"); } void command_npcstats(Client *c, const Seperator *sep) { if (c->GetTarget() == 0) - c->Message(0, "ERROR: No target!"); + c->Message(Chat::White, "ERROR: No target!"); else if (!c->GetTarget()->IsNPC()) - c->Message(0, "ERROR: Target is not a NPC!"); + c->Message(Chat::White, "ERROR: Target is not a NPC!"); else { auto target_npc = c->GetTarget()->CastToNPC(); - c->Message(0, "# NPC Stats"); - c->Message(0, "- Name: %s NpcID: %u", target_npc->GetName(), target_npc->GetNPCTypeID()); - c->Message(0, "- Race: %i Level: %i Class: %i Material: %i", target_npc->GetRace(), target_npc->GetLevel(), target_npc->GetClass(), target_npc->GetTexture()); - c->Message(0, "- Current HP: %i Max HP: %i", target_npc->GetHP(), target_npc->GetMaxHP()); - //c->Message(0, "Weapon Item Number: %s", target_npc->GetWeapNo()); - c->Message(0, "- Gender: %i Size: %f Bodytype: %d", target_npc->GetGender(), target_npc->GetSize(), target_npc->GetBodyType()); - c->Message(0, "- Runspeed: %.3f Walkspeed: %.3f", static_cast(0.025f * target_npc->GetRunspeed()), static_cast(0.025f * target_npc->GetWalkspeed())); - c->Message(0, "- Spawn Group: %i Grid: %i", target_npc->GetSp2(), target_npc->GetGrid()); + c->Message(Chat::White, "# NPC Stats"); + c->Message(Chat::White, "- Name: %s NpcID: %u", target_npc->GetName(), target_npc->GetNPCTypeID()); + c->Message(Chat::White, "- Race: %i Level: %i Class: %i Material: %i", target_npc->GetRace(), target_npc->GetLevel(), target_npc->GetClass(), target_npc->GetTexture()); + c->Message(Chat::White, "- Current HP: %i Max HP: %i", target_npc->GetHP(), target_npc->GetMaxHP()); + //c->Message(Chat::White, "Weapon Item Number: %s", target_npc->GetWeapNo()); + c->Message(Chat::White, "- Gender: %i Size: %f Bodytype: %d", target_npc->GetGender(), target_npc->GetSize(), target_npc->GetBodyType()); + c->Message(Chat::White, "- Runspeed: %.3f Walkspeed: %.3f", static_cast(0.025f * target_npc->GetRunspeed()), static_cast(0.025f * target_npc->GetWalkspeed())); + c->Message(Chat::White, "- Spawn Group: %i Grid: %i", target_npc->GetSp2(), target_npc->GetGrid()); if (target_npc->proximity) { - c->Message(0, "- Proximity: Enabled"); - c->Message(0, "-- Cur_X: %1.3f, Cur_Y: %1.3f, Cur_Z: %1.3f", target_npc->GetX(), target_npc->GetY(), target_npc->GetZ()); - c->Message(0, "-- Min_X: %1.3f(%1.3f), Max_X: %1.3f(%1.3f), X_Range: %1.3f", target_npc->proximity->min_x, (target_npc->proximity->min_x - target_npc->GetX()), target_npc->proximity->max_x, (target_npc->proximity->max_x - target_npc->GetX()), (target_npc->proximity->max_x - target_npc->proximity->min_x)); - c->Message(0, "-- Min_Y: %1.3f(%1.3f), Max_Y: %1.3f(%1.3f), Y_Range: %1.3f", target_npc->proximity->min_y, (target_npc->proximity->min_y - target_npc->GetY()), target_npc->proximity->max_y, (target_npc->proximity->max_y - target_npc->GetY()), (target_npc->proximity->max_y - target_npc->proximity->min_y)); - c->Message(0, "-- Min_Z: %1.3f(%1.3f), Max_Z: %1.3f(%1.3f), Z_Range: %1.3f", target_npc->proximity->min_z, (target_npc->proximity->min_z - target_npc->GetZ()), target_npc->proximity->max_z, (target_npc->proximity->max_z - target_npc->GetZ()), (target_npc->proximity->max_z - target_npc->proximity->min_z)); - c->Message(0, "-- Say: %s", (target_npc->proximity->say ? "Enabled" : "Disabled")); + c->Message(Chat::White, "- Proximity: Enabled"); + c->Message(Chat::White, "-- Cur_X: %1.3f, Cur_Y: %1.3f, Cur_Z: %1.3f", target_npc->GetX(), target_npc->GetY(), target_npc->GetZ()); + c->Message(Chat::White, "-- Min_X: %1.3f(%1.3f), Max_X: %1.3f(%1.3f), X_Range: %1.3f", target_npc->proximity->min_x, (target_npc->proximity->min_x - target_npc->GetX()), target_npc->proximity->max_x, (target_npc->proximity->max_x - target_npc->GetX()), (target_npc->proximity->max_x - target_npc->proximity->min_x)); + c->Message(Chat::White, "-- Min_Y: %1.3f(%1.3f), Max_Y: %1.3f(%1.3f), Y_Range: %1.3f", target_npc->proximity->min_y, (target_npc->proximity->min_y - target_npc->GetY()), target_npc->proximity->max_y, (target_npc->proximity->max_y - target_npc->GetY()), (target_npc->proximity->max_y - target_npc->proximity->min_y)); + c->Message(Chat::White, "-- Min_Z: %1.3f(%1.3f), Max_Z: %1.3f(%1.3f), Z_Range: %1.3f", target_npc->proximity->min_z, (target_npc->proximity->min_z - target_npc->GetZ()), target_npc->proximity->max_z, (target_npc->proximity->max_z - target_npc->GetZ()), (target_npc->proximity->max_z - target_npc->proximity->min_z)); + c->Message(Chat::White, "-- Say: %s", (target_npc->proximity->say ? "Enabled" : "Disabled")); } else { - c->Message(0, "-Proximity: Disabled"); + c->Message(Chat::White, "-Proximity: Disabled"); } - c->Message(0, ""); - c->Message(0, "EmoteID: %i", target_npc->GetEmoteID()); + c->Message(Chat::White, ""); + c->Message(Chat::White, "EmoteID: %i", target_npc->GetEmoteID()); target_npc->QueryLoot(c); } } @@ -1842,13 +1842,13 @@ void command_zclip(Client *c, const Seperator *sep) { // modifys and resends zhdr packet if(sep->arg[2][0]==0) - c->Message(0, "Usage: #zclip "); + c->Message(Chat::White, "Usage: #zclip "); else if(atoi(sep->arg[1])<=0) - c->Message(0, "ERROR: Min clip can not be zero or less!"); + c->Message(Chat::White, "ERROR: Min clip can not be zero or less!"); else if(atoi(sep->arg[2])<=0) - c->Message(0, "ERROR: Max clip can not be zero or less!"); + c->Message(Chat::White, "ERROR: Max clip can not be zero or less!"); else if(atoi(sep->arg[1])>atoi(sep->arg[2])) - c->Message(0, "ERROR: Min clip is greater than max clip!"); + c->Message(Chat::White, "ERROR: Min clip is greater than max clip!"); else { zone->newzone_data.minclip = atof(sep->arg[1]); zone->newzone_data.maxclip = atof(sep->arg[2]); @@ -1874,27 +1874,27 @@ void command_npccast(Client *c, const Seperator *sep) if (spelltar) c->GetTarget()->CastSpell(atoi(sep->arg[2]), spelltar->GetID()); else - c->Message(0, "Error: %s not found", sep->arg[1]); + c->Message(Chat::White, "Error: %s not found", sep->arg[1]); } else if (c->GetTarget() && c->GetTarget()->IsNPC() && sep->IsNumber(1) && sep->IsNumber(2) ) { Mob* spelltar = entity_list.GetMob(atoi(sep->arg[1])); if (spelltar) c->GetTarget()->CastSpell(atoi(sep->arg[2]), spelltar->GetID()); else - c->Message(0, "Error: target ID %i not found", atoi(sep->arg[1])); + c->Message(Chat::White, "Error: target ID %i not found", atoi(sep->arg[1])); } else - c->Message(0, "Usage: (needs NPC targeted) #npccast targetname/entityid spellid"); + c->Message(Chat::White, "Usage: (needs NPC targeted) #npccast targetname/entityid spellid"); } void command_zstats(Client *c, const Seperator *sep) { - c->Message(0, "Zone Header Data:"); - c->Message(0, "Sky Type: %i", zone->newzone_data.sky); - c->Message(0, "Fog Colour: Red: %i; Blue: %i; Green %i", zone->newzone_data.fog_red[0], zone->newzone_data.fog_green[0], zone->newzone_data.fog_blue[0]); - c->Message(0, "Safe Coords: %f, %f, %f", zone->newzone_data.safe_x, zone->newzone_data.safe_y, zone->newzone_data.safe_z); - c->Message(0, "Underworld Coords: %f", zone->newzone_data.underworld); - c->Message(0, "Clip Plane: %f - %f", zone->newzone_data.minclip, zone->newzone_data.maxclip); + c->Message(Chat::White, "Zone Header Data:"); + c->Message(Chat::White, "Sky Type: %i", zone->newzone_data.sky); + c->Message(Chat::White, "Fog Colour: Red: %i; Blue: %i; Green %i", zone->newzone_data.fog_red[0], zone->newzone_data.fog_green[0], zone->newzone_data.fog_blue[0]); + c->Message(Chat::White, "Safe Coords: %f, %f, %f", zone->newzone_data.safe_x, zone->newzone_data.safe_y, zone->newzone_data.safe_z); + c->Message(Chat::White, "Underworld Coords: %f", zone->newzone_data.underworld); + c->Message(Chat::White, "Clip Plane: %f - %f", zone->newzone_data.minclip, zone->newzone_data.maxclip); } void command_permaclass(Client *c, const Seperator *sep) @@ -1905,12 +1905,12 @@ void command_permaclass(Client *c, const Seperator *sep) t=c->GetTarget()->CastToClient(); if(sep->arg[1][0]==0) { - c->Message(0,"Usage: #permaclass "); + c->Message(Chat::White,"Usage: #permaclass "); } else if(!t->IsClient()) - c->Message(0,"Target is not a client."); + c->Message(Chat::White,"Target is not a client."); else { - c->Message(0, "Setting %s's class...Sending to char select.", t->GetName()); + c->Message(Chat::White, "Setting %s's class...Sending to char select.", t->GetName()); Log(Logs::General, Logs::Normal, "Class change request from %s for %s, requested class:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) ); t->SetBaseClass(atoi(sep->arg[1])); t->Save(); @@ -1926,13 +1926,13 @@ void command_permarace(Client *c, const Seperator *sep) t=c->GetTarget()->CastToClient(); if(sep->arg[1][0]==0) { - c->Message(0,"Usage: #permarace "); - c->Message(0,"NOTE: Not all models are global. If a model is not global, it will appear as a human on character select and in zones without the model."); + c->Message(Chat::White,"Usage: #permarace "); + c->Message(Chat::White,"NOTE: Not all models are global. If a model is not global, it will appear as a human on character select and in zones without the model."); } else if(!t->IsClient()) - c->Message(0,"Target is not a client."); + c->Message(Chat::White,"Target is not a client."); else { - c->Message(0, "Setting %s's race - zone to take effect", t->GetName()); + c->Message(Chat::White, "Setting %s's race - zone to take effect", t->GetName()); Log(Logs::General, Logs::Normal, "Permanant race change request from %s for %s, requested race:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) ); uint32 tmp = Mob::GetDefaultGender(atoi(sep->arg[1]), t->GetBaseGender()); t->SetBaseRace(atoi(sep->arg[1])); @@ -1950,13 +1950,13 @@ void command_permagender(Client *c, const Seperator *sep) t=c->GetTarget()->CastToClient(); if(sep->arg[1][0]==0) { - c->Message(0,"Usage: #permagender "); - c->Message(0,"Gender Numbers: 0=Male, 1=Female, 2=Neuter"); + c->Message(Chat::White,"Usage: #permagender "); + c->Message(Chat::White,"Gender Numbers: 0=Male, 1=Female, 2=Neuter"); } else if(!t->IsClient()) - c->Message(0,"Target is not a client."); + c->Message(Chat::White,"Target is not a client."); else { - c->Message(0, "Setting %s's gender - zone to take effect", t->GetName()); + c->Message(Chat::White, "Setting %s's gender - zone to take effect", t->GetName()); Log(Logs::General, Logs::Normal, "Permanant gender change request from %s for %s, requested gender:%i", c->GetName(), t->GetName(), atoi(sep->arg[1]) ); t->SetBaseGender(atoi(sep->arg[1])); t->Save(); @@ -1967,12 +1967,12 @@ void command_permagender(Client *c, const Seperator *sep) void command_weather(Client *c, const Seperator *sep) { if (!(sep->arg[1][0] == '0' || sep->arg[1][0] == '1' || sep->arg[1][0] == '2' || sep->arg[1][0] == '3')) { - c->Message(0, "Usage: #weather <0/1/2/3> - Off/Rain/Snow/Manual."); + c->Message(Chat::White, "Usage: #weather <0/1/2/3> - Off/Rain/Snow/Manual."); } else if(zone->zone_weather == 0) { if(sep->arg[1][0] == '3') { // Put in modifications here because it had a very good chance at screwing up the client's weather system if rain was sent during snow -T7 if(sep->arg[2][0] != 0 && sep->arg[3][0] != 0) { - c->Message(0, "Sending weather packet... TYPE=%s, INTENSITY=%s", sep->arg[2], sep->arg[3]); + c->Message(Chat::White, "Sending weather packet... TYPE=%s, INTENSITY=%s", sep->arg[2], sep->arg[3]); zone->zone_weather = atoi(sep->arg[2]); auto outapp = new EQApplicationPacket(OP_Weather, 8); outapp->pBuffer[0] = atoi(sep->arg[2]); @@ -1981,7 +1981,7 @@ void command_weather(Client *c, const Seperator *sep) safe_delete(outapp); } else { - c->Message(0, "Manual Usage: #weather 3 "); + c->Message(Chat::White, "Manual Usage: #weather 3 "); } } else if(sep->arg[1][0] == '2') { @@ -2035,16 +2035,16 @@ void command_zheader(Client *c, const Seperator *sep) { // sends zhdr packet if(sep->arg[1][0]==0) { - c->Message(0, "Usage: #zheader "); + c->Message(Chat::White, "Usage: #zheader "); } else if(database.GetZoneID(sep->argplus[1])==0) - c->Message(0, "Invalid Zone Name: %s", sep->argplus[1]); + c->Message(Chat::White, "Invalid Zone Name: %s", sep->argplus[1]); else { if (zone->LoadZoneCFG(sep->argplus[1], 0)) - c->Message(0, "Successfully loaded zone header for %s from database.", sep->argplus[1]); + c->Message(Chat::White, "Successfully loaded zone header for %s from database.", sep->argplus[1]); else - c->Message(0, "Failed to load zone header %s from database", sep->argplus[1]); + c->Message(Chat::White, "Failed to load zone header %s from database", sep->argplus[1]); auto outapp = new EQApplicationPacket(OP_NewZone, sizeof(NewZone_Struct)); memcpy(outapp->pBuffer, &zone->newzone_data, outapp->size); entity_list.QueueClients(c, outapp); @@ -2056,9 +2056,9 @@ void command_zsky(Client *c, const Seperator *sep) { // modifys and resends zhdr packet if(sep->arg[1][0]==0) - c->Message(0, "Usage: #zsky "); + c->Message(Chat::White, "Usage: #zsky "); else if(atoi(sep->arg[1])<0||atoi(sep->arg[1])>255) - c->Message(0, "ERROR: Sky type can not be less than 0 or greater than 255!"); + c->Message(Chat::White, "ERROR: Sky type can not be less than 0 or greater than 255!"); else { zone->newzone_data.sky = atoi(sep->arg[1]); auto outapp = new EQApplicationPacket(OP_NewZone, sizeof(NewZone_Struct)); @@ -2072,13 +2072,13 @@ void command_zcolor(Client *c, const Seperator *sep) { // modifys and resends zhdr packet if (sep->arg[3][0]==0) - c->Message(0, "Usage: #zcolor "); + c->Message(Chat::White, "Usage: #zcolor "); else if (atoi(sep->arg[1])<0||atoi(sep->arg[1])>255) - c->Message(0, "ERROR: Red can not be less than 0 or greater than 255!"); + c->Message(Chat::White, "ERROR: Red can not be less than 0 or greater than 255!"); else if (atoi(sep->arg[2])<0||atoi(sep->arg[2])>255) - c->Message(0, "ERROR: Green can not be less than 0 or greater than 255!"); + c->Message(Chat::White, "ERROR: Green can not be less than 0 or greater than 255!"); else if (atoi(sep->arg[3])<0||atoi(sep->arg[3])>255) - c->Message(0, "ERROR: Blue can not be less than 0 or greater than 255!"); + c->Message(Chat::White, "ERROR: Blue can not be less than 0 or greater than 255!"); else { for (int z=0; z<4; z++) { zone->newzone_data.fog_red[z] = atoi(sep->arg[1]); @@ -2131,7 +2131,7 @@ void command_gassign(Client *c, const Seperator *sep) database.AssignGrid(c, atoi(sep->arg[1]), spawn2id); } else - c->Message(0, "Usage: #gassign [num] - must have an npc target!"); + c->Message(Chat::White, "Usage: #gassign [num] - must have an npc target!"); } void command_ai(Client *c, const Seperator *sep) @@ -2143,37 +2143,37 @@ void command_ai(Client *c, const Seperator *sep) if (target->IsNPC()) target->CastToNPC()->SetNPCFactionID(atoi(sep->arg[2])); else - c->Message(0, "%s is not an NPC.", target->GetName()); + c->Message(Chat::White, "%s is not an NPC.", target->GetName()); } else - c->Message(0, "Usage: (targeted) #ai factionid [factionid]"); + c->Message(Chat::White, "Usage: (targeted) #ai factionid [factionid]"); } else if (strcasecmp(sep->arg[1], "spellslist") == 0) { if (target && sep->IsNumber(2) && atoi(sep->arg[2]) >= 0) { if (target->IsNPC()) target->CastToNPC()->AI_AddNPCSpells(atoi(sep->arg[2])); else - c->Message(0, "%s is not an NPC.", target->GetName()); + c->Message(Chat::White, "%s is not an NPC.", target->GetName()); } else - c->Message(0, "Usage: (targeted) #ai spellslist [npc_spells_id]"); + c->Message(Chat::White, "Usage: (targeted) #ai spellslist [npc_spells_id]"); } else if (strcasecmp(sep->arg[1], "con") == 0) { if (target && sep->arg[2][0] != 0) { Mob* tar2 = entity_list.GetMob(sep->arg[2]); if (tar2) - c->Message(0, "%s considering %s: %i", target->GetName(), tar2->GetName(), tar2->GetReverseFactionCon(target)); + c->Message(Chat::White, "%s considering %s: %i", target->GetName(), tar2->GetName(), tar2->GetReverseFactionCon(target)); else - c->Message(0, "Error: %s not found.", sep->arg[2]); + c->Message(Chat::White, "Error: %s not found.", sep->arg[2]); } else - c->Message(0, "Usage: (targeted) #ai con [mob name]"); + c->Message(Chat::White, "Usage: (targeted) #ai con [mob name]"); } else if (strcasecmp(sep->arg[1], "guard") == 0) { if (target && target->IsNPC()) target->CastToNPC()->SaveGuardSpot(target->GetPosition()); else - c->Message(0, "Usage: (targeted) #ai guard - sets npc to guard the current location (use #summon to move)"); + c->Message(Chat::White, "Usage: (targeted) #ai guard - sets npc to guard the current location (use #summon to move)"); } else if (strcasecmp(sep->arg[1], "roambox") == 0) { if (target && target->IsAIControlled() && target->IsNPC()) { @@ -2196,39 +2196,39 @@ void command_ai(Client *c, const Seperator *sep) target->CastToNPC()->AI_SetRoambox(atof(sep->arg[2]), atof(sep->arg[3]), tmp, tmp2); } else { - c->Message(0, "Usage: #ai roambox dist max_x min_x max_y min_y [delay] [mindelay]"); - c->Message(0, "Usage: #ai roambox dist roamdist [delay] [mindelay]"); + c->Message(Chat::White, "Usage: #ai roambox dist max_x min_x max_y min_y [delay] [mindelay]"); + c->Message(Chat::White, "Usage: #ai roambox dist roamdist [delay] [mindelay]"); } } else - c->Message(0, "You need a AI NPC targeted"); + c->Message(Chat::White, "You need a AI NPC targeted"); } else if (strcasecmp(sep->arg[1], "stop") == 0 && c->Admin() >= commandToggleAI) { if (target) { if (target->IsAIControlled()) target->AI_Stop(); else - c->Message(0, "Error: Target is not AI controlled"); + c->Message(Chat::White, "Error: Target is not AI controlled"); } else - c->Message(0, "Usage: Target a Mob with AI enabled and use this to turn off their AI."); + c->Message(Chat::White, "Usage: Target a Mob with AI enabled and use this to turn off their AI."); } else if (strcasecmp(sep->arg[1], "start") == 0 && c->Admin() >= commandToggleAI) { if (target) { if (!target->IsAIControlled()) target->AI_Start(); else - c->Message(0, "Error: Target is already AI controlled"); + c->Message(Chat::White, "Error: Target is already AI controlled"); } else - c->Message(0, "Usage: Target a Mob with AI disabled and use this to turn on their AI."); + c->Message(Chat::White, "Usage: Target a Mob with AI disabled and use this to turn on their AI."); } else { - c->Message(0, "#AI Sub-commands"); - c->Message(0, " factionid"); - c->Message(0, " spellslist"); - c->Message(0, " con"); - c->Message(0, " guard"); + c->Message(Chat::White, "#AI Sub-commands"); + c->Message(Chat::White, " factionid"); + c->Message(Chat::White, " spellslist"); + c->Message(Chat::White, " con"); + c->Message(Chat::White, " guard"); } } @@ -2240,7 +2240,7 @@ void command_worldshutdown(Client *c, const Seperator *sep) if (worldserver.Connected()) { if(sep->IsNumber(1) && sep->IsNumber(2) && ((time=atoi(sep->arg[1]))>0) && ((interval=atoi(sep->arg[2]))>0)) { worldserver.SendEmoteMessage(0,0,15,":SYSTEM MSG:World coming down in %i minutes, everyone log out before this time.", (time / 60 )); - c->Message(0, "Sending shutdown packet now, World will shutdown in: %i minutes with an interval of: %i seconds", (time / 60), interval); + c->Message(Chat::White, "Sending shutdown packet now, World will shutdown in: %i minutes with an interval of: %i seconds", (time / 60), interval); auto pack = new ServerPacket(ServerOP_ShutdownAll, sizeof(WorldShutDown_Struct)); WorldShutDown_Struct* wsd = (WorldShutDown_Struct*)pack->pBuffer; wsd->time=time*1000; @@ -2250,7 +2250,7 @@ void command_worldshutdown(Client *c, const Seperator *sep) } else if(strcasecmp(sep->arg[1], "now") == 0){ worldserver.SendEmoteMessage(0,0,15,":SYSTEM MSG:World coming down, everyone log out now."); - c->Message(0, "Sending shutdown packet"); + c->Message(Chat::White, "Sending shutdown packet"); auto pack = new ServerPacket; pack->opcode = ServerOP_ShutdownAll; pack->size=0; @@ -2258,7 +2258,7 @@ void command_worldshutdown(Client *c, const Seperator *sep) safe_delete(pack); } else if(strcasecmp(sep->arg[1], "disable") == 0){ - c->Message(0, "Shutdown prevented, next time I may not be so forgiving..."); + c->Message(Chat::White, "Shutdown prevented, next time I may not be so forgiving..."); auto pack = new ServerPacket(ServerOP_ShutdownAll, sizeof(WorldShutDown_Struct)); WorldShutDown_Struct* wsd = (WorldShutDown_Struct*)pack->pBuffer; wsd->time=0; @@ -2267,14 +2267,14 @@ void command_worldshutdown(Client *c, const Seperator *sep) safe_delete(pack); } else{ - c->Message(0,"#worldshutdown - Shuts down the server and all zones."); - c->Message(0,"Usage: #worldshutdown now - Shuts down the server and all zones immediately."); - c->Message(0,"Usage: #worldshutdown disable - Stops the server from a previously scheduled shut down."); - c->Message(0,"Usage: #worldshutdown [timer] [interval] - Shuts down the server and all zones after [timer] seconds and sends warning every [interval] seconds."); + c->Message(Chat::White,"#worldshutdown - Shuts down the server and all zones."); + c->Message(Chat::White,"Usage: #worldshutdown now - Shuts down the server and all zones immediately."); + c->Message(Chat::White,"Usage: #worldshutdown disable - Stops the server from a previously scheduled shut down."); + c->Message(Chat::White,"Usage: #worldshutdown [timer] [interval] - Shuts down the server and all zones after [timer] seconds and sends warning every [interval] seconds."); } } else - c->Message(0, "Error: World server disconnected"); + c->Message(Chat::White, "Error: World server disconnected"); } void command_sendzonespawns(Client *c, const Seperator *sep) @@ -2307,7 +2307,7 @@ void command_dbspawn2(Client *c, const Seperator *sep) database.CreateSpawn2(c, atoi(sep->arg[1]), zone->GetShortName(), c->GetPosition(), atoi(sep->arg[2]), atoi(sep->arg[3]), cond, cond_min); } else { - c->Message(0, "Usage: #dbspawn2 spawngroup respawn variance [condition_id] [condition_min]"); + c->Message(Chat::White, "Usage: #dbspawn2 spawngroup respawn variance [condition_id] [condition_min]"); } } @@ -2319,36 +2319,36 @@ void command_shutdown(Client *c, const Seperator *sep) void command_delacct(Client *c, const Seperator *sep) { if(sep->arg[1][0] == 0) - c->Message(0, "Format: #delacct accountname"); + c->Message(Chat::White, "Format: #delacct accountname"); else if (database.DeleteAccount(sep->arg[1])) - c->Message(0, "The account was deleted."); + c->Message(Chat::White, "The account was deleted."); else - c->Message(0, "Unable to delete account."); + c->Message(Chat::White, "Unable to delete account."); } void command_setpass(Client *c, const Seperator *sep) { if(sep->argnum != 2) - c->Message(0, "Format: #setpass accountname password"); + c->Message(Chat::White, "Format: #setpass accountname password"); else { int16 tmpstatus = 0; uint32 tmpid = database.GetAccountIDByName(sep->arg[1], &tmpstatus); if (!tmpid) - c->Message(0, "Error: Account not found"); + c->Message(Chat::White, "Error: Account not found"); else if (tmpstatus > c->Admin()) - c->Message(0, "Cannot change password: Account's status is higher than yours"); + c->Message(Chat::White, "Cannot change password: Account's status is higher than yours"); else if (database.SetLocalPassword(tmpid, sep->arg[2])) - c->Message(0, "Password changed."); + c->Message(Chat::White, "Password changed."); else - c->Message(0, "Error changing password."); + c->Message(Chat::White, "Error changing password."); } } void command_setlsinfo(Client *c, const Seperator *sep) { if(sep->argnum != 2) - c->Message(0, "Format: #setlsinfo email password"); + c->Message(Chat::White, "Format: #setlsinfo email password"); else { auto pack = new ServerPacket(ServerOP_LSAccountUpdate, sizeof(ServerLSAccountUpdate_Struct)); ServerLSAccountUpdate_Struct* s = (ServerLSAccountUpdate_Struct *) pack->pBuffer; @@ -2357,14 +2357,14 @@ void command_setlsinfo(Client *c, const Seperator *sep) strn0cpy(s->useremail, sep->arg[1], 100); strn0cpy(s->userpassword, sep->arg[2], 50); worldserver.SendPacket(pack); - c->Message(0, "Login Server update packet sent."); + c->Message(Chat::White, "Login Server update packet sent."); } } void command_grid(Client *c, const Seperator *sep) { if (strcasecmp("max", sep->arg[1]) == 0) { - c->Message(0, "Highest grid ID in this zone: %d", database.GetHighestGrid(zone->GetZoneID())); + c->Message(Chat::White, "Highest grid ID in this zone: %d", database.GetHighestGrid(zone->GetZoneID())); } else if (strcasecmp("add", sep->arg[1]) == 0) { database.ModifyGrid(c, false, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), zone->GetZoneID()); @@ -2374,7 +2374,7 @@ void command_grid(Client *c, const Seperator *sep) Mob *target = c->GetTarget(); if (!target || !target->IsNPC()) { - c->Message(0, "You need a NPC target!"); + c->Message(Chat::White, "You need a NPC target!"); return; } @@ -2389,12 +2389,12 @@ void command_grid(Client *c, const Seperator *sep) auto results = database.QueryDatabase(query); if (!results.Success()) { - c->Message(0, "Error querying database."); - c->Message(0, query.c_str()); + c->Message(Chat::White, "Error querying database."); + c->Message(Chat::White, query.c_str()); } if (results.RowCount() == 0) { - c->Message(0, "No grid found"); + c->Message(Chat::White, "No grid found"); return; } @@ -2430,8 +2430,8 @@ void command_grid(Client *c, const Seperator *sep) database.ModifyGrid(c, true, atoi(sep->arg[2]), 0, 0, zone->GetZoneID()); } else { - c->Message(0, "Usage: #grid add/delete grid_num wandertype pausetype"); - c->Message(0, "Usage: #grid max - displays the highest grid ID used in this zone (for add)"); + c->Message(Chat::White, "Usage: #grid add/delete grid_num wandertype pausetype"); + c->Message(Chat::White, "Usage: #grid max - displays the highest grid ID used in this zone (for add)"); } } @@ -2454,7 +2454,7 @@ void command_wp(Client *c, const Seperator *sep) else if (strcasecmp("delete", sep->arg[1]) == 0) database.DeleteWaypoint(c, atoi(sep->arg[2]),wp,zone->GetZoneID()); else - c->Message(0,"Usage: #wp add/delete grid_num pause wp_num [-h]"); + c->Message(Chat::White,"Usage: #wp add/delete grid_num pause wp_num [-h]"); } void command_iplookup(Client *c, const Seperator *sep) @@ -2474,15 +2474,15 @@ void command_size(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0, "Usage: #size [0 - 255] (Decimal increments are allowed)"); + c->Message(Chat::White, "Usage: #size [0 - 255] (Decimal increments are allowed)"); else { float newsize = atof(sep->arg[1]); if (newsize > 255) - c->Message(0, "Error: #size: Size can not be greater than 255."); + c->Message(Chat::White, "Error: #size: Size can not be greater than 255."); else if (newsize < 0) - c->Message(0, "Error: #size: Size can not be less than 0."); + c->Message(Chat::White, "Error: #size: Size can not be less than 0."); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -2503,7 +2503,7 @@ void command_size(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails, newsize); - c->Message(0,"Size = %f", atof(sep->arg[1])); + c->Message(Chat::White,"Size = %f", atof(sep->arg[1])); } } } @@ -2525,7 +2525,7 @@ void command_flymode(Client *c, const Seperator *sep) Mob *t = c; if (strlen(sep->arg[1]) == 1 && !(sep->arg[1][0] == '0' || sep->arg[1][0] == '1' || sep->arg[1][0] == '2' || sep->arg[1][0] == '3' || sep->arg[1][0] == '4' || sep->arg[1][0] == '5')) - c->Message(0, "#flymode [0/1/2/3/4/5]"); + c->Message(Chat::White, "#flymode [0/1/2/3/4/5]"); else { if (c->GetTarget()) { t = c->GetTarget(); @@ -2536,22 +2536,22 @@ void command_flymode(Client *c, const Seperator *sep) t->SetFlyMode(static_cast(fm)); t->SendAppearancePacket(AT_Levitate, fm); if (sep->arg[1][0] == '0') { - c->Message(0, "Setting %s to Grounded", t->GetName()); + c->Message(Chat::White, "Setting %s to Grounded", t->GetName()); } else if (sep->arg[1][0] == '1') { - c->Message(0, "Setting %s to Flying", t->GetName()); + c->Message(Chat::White, "Setting %s to Flying", t->GetName()); } else if (sep->arg[1][0] == '2') { - c->Message(0, "Setting %s to Levitating", t->GetName()); + c->Message(Chat::White, "Setting %s to Levitating", t->GetName()); } else if (sep->arg[1][0] == '3') { - c->Message(0, "Setting %s to In Water", t->GetName()); + c->Message(Chat::White, "Setting %s to In Water", t->GetName()); } else if (sep->arg[1][0] == '4') { - c->Message(0, "Setting %s to Floating(Boat)", t->GetName()); + c->Message(Chat::White, "Setting %s to Floating(Boat)", t->GetName()); } else if (sep->arg[1][0] == '5') { - c->Message(0, "Setting %s to Levitating While Running", t->GetName()); + c->Message(Chat::White, "Setting %s to Levitating While Running", t->GetName()); } } } @@ -2563,24 +2563,24 @@ void command_showskills(Client *c, const Seperator *sep) if(c->GetTarget() && c->GetTarget()->IsClient()) t=c->GetTarget()->CastToClient(); - c->Message(0, "Skills for %s", t->GetName()); + c->Message(Chat::White, "Skills for %s", t->GetName()); for (EQEmu::skills::SkillType i = EQEmu::skills::Skill1HBlunt; i <= EQEmu::skills::HIGHEST_SKILL; i = (EQEmu::skills::SkillType)(i + 1)) - c->Message(0, "Skill [%d] is at [%d] - %u", i, t->GetSkill(i), t->GetRawSkill(i)); + c->Message(Chat::White, "Skill [%d] is at [%d] - %u", i, t->GetSkill(i), t->GetRawSkill(i)); } void command_findspell(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) - c->Message(0, "Usage: #FindSpell [spellname]"); + c->Message(Chat::White, "Usage: #FindSpell [spellname]"); else if (SPDAT_RECORDS <= 0) - c->Message(0, "Spells not loaded"); + c->Message(Chat::White, "Spells not loaded"); else if (Seperator::IsNumber(sep->argplus[1])) { int spellid = atoi(sep->argplus[1]); if (spellid <= 0 || spellid >= SPDAT_RECORDS) { - c->Message(0, "Error: Number out of range"); + c->Message(Chat::White, "Error: Number out of range"); } else { - c->Message(0, " %i: %s", spellid, spells[spellid].name); + c->Message(Chat::White, " %i: %s", spellid, spells[spellid].name); } } else { @@ -2597,7 +2597,7 @@ void command_findspell(Client *c, const Seperator *sep) strupr(sName); char* pdest = strstr(sName, sCriteria); if ((pdest != nullptr) && (count <=20)) { - c->Message(0, " %i: %s", i, spells[i].name); + c->Message(Chat::White, " %i: %s", i, spells[i].name); count++; } else if (count > 20) @@ -2605,16 +2605,16 @@ void command_findspell(Client *c, const Seperator *sep) } } if (count > 20) - c->Message(0, "20 spells found... max reached."); + c->Message(Chat::White, "20 spells found... max reached."); else - c->Message(0, "%i spells found.", count); + c->Message(Chat::White, "%i spells found.", count); } } void command_castspell(Client *c, const Seperator *sep) { if (!sep->IsNumber(1)) - c->Message(0, "Usage: #CastSpell spellid"); + c->Message(Chat::White, "Usage: #CastSpell spellid"); else { uint16 spellid = atoi(sep->arg[1]); /* @@ -2629,7 +2629,7 @@ void command_castspell(Client *c, const Seperator *sep) c->Admin() < commandCastSpecials) c->Message(Chat::Red, "Unable to cast spell."); else if (spellid >= SPDAT_RECORDS) - c->Message(0, "Error: #CastSpell: Argument out of range"); + c->Message(Chat::White, "Error: #CastSpell: Argument out of range"); else if (c->GetTarget() == 0) if(c->Admin() >= commandInstacast) @@ -2648,51 +2648,51 @@ void command_setlanguage(Client *c, const Seperator *sep) { if (strcasecmp(sep->arg[1], "list" ) == 0 ) { - c->Message(0, "Languages:"); - c->Message(0, "(0) Common Tongue"); - c->Message(0, "(1) Barbarian"); - c->Message(0, "(2) Erudian"); - c->Message(0, "(3) Elvish"); - c->Message(0, "(4) Dark Elvish"); - c->Message(0, "(5) Dwarvish"); - c->Message(0, "(6) Troll"); - c->Message(0, "(7) Ogre"); - c->Message(0, "(8) Gnomish"); - c->Message(0, "(9) Halfling"); - c->Message(0, "(10) Thieves Cant"); - c->Message(0, "(11) Old Erudian"); - c->Message(0, "(12) Elder Elvish"); - c->Message(0, "(13) Froglok"); - c->Message(0, "(14) Goblin"); - c->Message(0, "(15) Gnoll"); - c->Message(0, "(16) Combine Tongue"); - c->Message(0, "(17) Elder Teir`Dal"); - c->Message(0, "(18) Lizardman"); - c->Message(0, "(19) Orcish"); - c->Message(0, "(20) Faerie"); - c->Message(0, "(21) Dragon"); - c->Message(0, "(22) Elder Dragon"); - c->Message(0, "(23) Dark Speech"); - c->Message(0, "(24) Vah Shir"); - c->Message(0, "(25) Alaran"); - c->Message(0, "(26) Hadal"); - c->Message(0, "(27) Unknown1"); + c->Message(Chat::White, "Languages:"); + c->Message(Chat::White, "(0) Common Tongue"); + c->Message(Chat::White, "(1) Barbarian"); + c->Message(Chat::White, "(2) Erudian"); + c->Message(Chat::White, "(3) Elvish"); + c->Message(Chat::White, "(4) Dark Elvish"); + c->Message(Chat::White, "(5) Dwarvish"); + c->Message(Chat::White, "(6) Troll"); + c->Message(Chat::White, "(7) Ogre"); + c->Message(Chat::White, "(8) Gnomish"); + c->Message(Chat::White, "(9) Halfling"); + c->Message(Chat::White, "(10) Thieves Cant"); + c->Message(Chat::White, "(11) Old Erudian"); + c->Message(Chat::White, "(12) Elder Elvish"); + c->Message(Chat::White, "(13) Froglok"); + c->Message(Chat::White, "(14) Goblin"); + c->Message(Chat::White, "(15) Gnoll"); + c->Message(Chat::White, "(16) Combine Tongue"); + c->Message(Chat::White, "(17) Elder Teir`Dal"); + c->Message(Chat::White, "(18) Lizardman"); + c->Message(Chat::White, "(19) Orcish"); + c->Message(Chat::White, "(20) Faerie"); + c->Message(Chat::White, "(21) Dragon"); + c->Message(Chat::White, "(22) Elder Dragon"); + c->Message(Chat::White, "(23) Dark Speech"); + c->Message(Chat::White, "(24) Vah Shir"); + c->Message(Chat::White, "(25) Alaran"); + c->Message(Chat::White, "(26) Hadal"); + c->Message(Chat::White, "(27) Unknown1"); } else if( c->GetTarget() == 0 ) { - c->Message(0, "Error: #setlanguage: No target."); + c->Message(Chat::White, "Error: #setlanguage: No target."); } else if( !c->GetTarget()->IsClient() ) { - c->Message(0, "Error: Target must be a player."); + c->Message(Chat::White, "Error: Target must be a player."); } else if ( !sep->IsNumber(1) || atoi(sep->arg[1]) < 0 || atoi(sep->arg[1]) > 27 || !sep->IsNumber(2) || atoi(sep->arg[2]) < 0 || atoi(sep->arg[2]) > 100 ) { - c->Message(0, "Usage: #setlanguage [language ID] [value] (0-27, 0-100)"); - c->Message(0, "Try #setlanguage list for a list of language IDs"); + c->Message(Chat::White, "Usage: #setlanguage [language ID] [value] (0-27, 0-100)"); + c->Message(Chat::White, "Try #setlanguage list for a list of language IDs"); } else { @@ -2706,19 +2706,19 @@ void command_setlanguage(Client *c, const Seperator *sep) void command_setskill(Client *c, const Seperator *sep) { if (c->GetTarget() == nullptr) { - c->Message(0, "Error: #setskill: No target."); + c->Message(Chat::White, "Error: #setskill: No target."); } else if (!c->GetTarget()->IsClient()) { - c->Message(0, "Error: #setskill: Target must be a client."); + c->Message(Chat::White, "Error: #setskill: Target must be a client."); } else if ( !sep->IsNumber(1) || atoi(sep->arg[1]) < 0 || atoi(sep->arg[1]) > EQEmu::skills::HIGHEST_SKILL || !sep->IsNumber(2) || atoi(sep->arg[2]) < 0 || atoi(sep->arg[2]) > HIGHEST_CAN_SET_SKILL ) { - c->Message(0, "Usage: #setskill skill x "); - c->Message(0, " skill = 0 to %d", EQEmu::skills::HIGHEST_SKILL); - c->Message(0, " x = 0 to %d", HIGHEST_CAN_SET_SKILL); + c->Message(Chat::White, "Usage: #setskill skill x "); + c->Message(Chat::White, " skill = 0 to %d", EQEmu::skills::HIGHEST_SKILL); + c->Message(Chat::White, " x = 0 to %d", HIGHEST_CAN_SET_SKILL); } else { Log(Logs::General, Logs::Normal, "Set skill request from %s, target:%s skill_id:%i value:%i", c->GetName(), c->GetTarget()->GetName(), atoi(sep->arg[1]), atoi(sep->arg[2]) ); @@ -2732,12 +2732,12 @@ void command_setskill(Client *c, const Seperator *sep) void command_setskillall(Client *c, const Seperator *sep) { if (c->GetTarget() == 0) - c->Message(0, "Error: #setallskill: No target."); + c->Message(Chat::White, "Error: #setallskill: No target."); else if (!c->GetTarget()->IsClient()) - c->Message(0, "Error: #setskill: Target must be a client."); + c->Message(Chat::White, "Error: #setskill: Target must be a client."); else if (!sep->IsNumber(1) || atoi(sep->arg[1]) < 0 || atoi(sep->arg[1]) > HIGHEST_CAN_SET_SKILL) { - c->Message(0, "Usage: #setskillall value "); - c->Message(0, " value = 0 to %d", HIGHEST_CAN_SET_SKILL); + c->Message(Chat::White, "Usage: #setskillall value "); + c->Message(Chat::White, " value = 0 to %d", HIGHEST_CAN_SET_SKILL); } else { if (c->Admin() >= commandSetSkillsOther || c->GetTarget()==c || c->GetTarget()==0) { @@ -2748,7 +2748,7 @@ void command_setskillall(Client *c, const Seperator *sep) } } else - c->Message(0, "Error: Your status is not high enough to set anothers skills"); + c->Message(Chat::White, "Error: Your status is not high enough to set anothers skills"); } } @@ -2765,11 +2765,11 @@ void command_race(Client *c, const Seperator *sep) target->SendIllusionPacket(race); } else { - c->Message(0, "Usage: #race [0-732, 2253-2259] (0 for back to normal)"); + c->Message(Chat::White, "Usage: #race [0-732, 2253-2259] (0 for back to normal)"); } } else { - c->Message(0, "Usage: #race [0-732, 2253-2259] (0 for back to normal)"); + c->Message(Chat::White, "Usage: #race [0-732, 2253-2259] (0 for back to normal)"); } } @@ -2783,13 +2783,13 @@ void command_gender(Client *c, const Seperator *sep) t->SendIllusionPacket(t->GetRace(), atoi(sep->arg[1])); } else - c->Message(0, "Usage: #gender [0/1/2]"); + c->Message(Chat::White, "Usage: #gender [0/1/2]"); } void command_makepet(Client *c, const Seperator *sep) { if (sep->arg[1][0] == '\0') - c->Message(0, "Usage: #makepet pet_type_name (will not survive across zones)"); + c->Message(Chat::White, "Usage: #makepet pet_type_name (will not survive across zones)"); else c->MakePet(0, sep->arg[1]); } @@ -2799,7 +2799,7 @@ void command_level(Client *c, const Seperator *sep) uint16 level = atoi(sep->arg[1]); if ((level <= 0) || ((level > RuleI(Character, MaxLevel)) && (c->Admin() < commandLevelAboveCap))) { - c->Message(0, "Error: #Level: Invalid Level"); + c->Message(Chat::White, "Error: #Level: Invalid Level"); } else if (c->Admin() < RuleI(GM, MinStatusToLevelTarget)) { c->SetLevel(level, true); @@ -2809,11 +2809,11 @@ void command_level(Client *c, const Seperator *sep) #endif } else if (!c->GetTarget()) { - c->Message(0, "Error: #Level: No target"); + c->Message(Chat::White, "Error: #Level: No target"); } else { if (!c->GetTarget()->IsNPC() && ((c->Admin() < commandLevelNPCAboveCap) && (level > RuleI(Character, MaxLevel)))) { - c->Message(0, "Error: #Level: Invalid Level"); + c->Message(Chat::White, "Error: #Level: Invalid Level"); } else { c->GetTarget()->SetLevel(level, true); @@ -2833,16 +2833,16 @@ void command_spawn(Client *c, const Seperator *sep) if (sep->arg[1][0] != 0){ Client* client = entity_list.GetClientByName(sep->arg[1]); if(client){ - c->Message(0,"You cannot spawn a mob with the same name as a character!"); + c->Message(Chat::White,"You cannot spawn a mob with the same name as a character!"); return; } } NPC* npc = NPC::SpawnNPC(sep->argplus[1], c->GetPosition(), c); if (!npc) { - c->Message(0, "Format: #spawn name race level material hp gender class priweapon secweapon merchantid bodytype - spawns a npc those parameters."); - c->Message(0, "Name Format: NPCFirstname_NPCLastname - All numbers in a name are stripped and \"_\" characters become a space."); - c->Message(0, "Note: Using \"-\" for gender will autoselect the gender for the race. Using \"-\" for HP will use the calculated maximum HP."); + c->Message(Chat::White, "Format: #spawn name race level material hp gender class priweapon secweapon merchantid bodytype - spawns a npc those parameters."); + c->Message(Chat::White, "Name Format: NPCFirstname_NPCLastname - All numbers in a name are stripped and \"_\" characters become a space."); + c->Message(Chat::White, "Note: Using \"-\" for gender will autoselect the gender for the race. Using \"-\" for HP will use the calculated maximum HP."); } } @@ -2900,7 +2900,7 @@ void command_texture(Client *c, const Seperator *sep) } } else - c->Message(0, "Usage: #texture [texture] [helmtexture] (0-255, 255 for show equipment)"); + c->Message(Chat::White, "Usage: #texture [texture] [helmtexture] (0-255, 255 for show equipment)"); } void command_npctypespawn(Client *c, const Seperator *sep) @@ -2919,17 +2919,17 @@ void command_npctypespawn(Client *c, const Seperator *sep) entity_list.AddNPC(npc); } else - c->Message(0, "NPC Type %i not found", atoi(sep->arg[1])); + c->Message(Chat::White, "NPC Type %i not found", atoi(sep->arg[1])); } else - c->Message(0, "Usage: #npctypespawn npctypeid factionid"); + c->Message(Chat::White, "Usage: #npctypespawn npctypeid factionid"); } void command_heal(Client *c, const Seperator *sep) { if (c->GetTarget()==0) - c->Message(0, "Error: #Heal: No Target."); + c->Message(Chat::White, "Error: #Heal: No Target."); else c->GetTarget()->Heal(); } @@ -2941,12 +2941,12 @@ void command_appearance(Client *c, const Seperator *sep) // sends any appearance packet // Dev debug command, for appearance types if (sep->arg[2][0] == 0) - c->Message(0, "Usage: #appearance type value"); + c->Message(Chat::White, "Usage: #appearance type value"); else { if ((c->GetTarget())) t=c->GetTarget(); t->SendAppearancePacket(atoi(sep->arg[1]), atoi(sep->arg[2])); - c->Message(0, "Sending appearance packet: target=%s, type=%s, value=%s", t->GetName(), sep->arg[1], sep->arg[2]); + c->Message(Chat::White, "Sending appearance packet: target=%s, type=%s, value=%s", t->GetName(), sep->arg[1], sep->arg[2]); } } @@ -2957,10 +2957,10 @@ void command_nukeitem(Client *c, const Seperator *sep) if (c->GetTarget() && c->GetTarget()->IsClient() && (sep->IsNumber(1) || sep->IsHexNumber(1))) { itemid=sep->IsNumber(1)?atoi(sep->arg[1]):hextoi(sep->arg[1]); numitems = c->GetTarget()->CastToClient()->NukeItem(itemid); - c->Message(0, " %u items deleted", numitems); + c->Message(Chat::White, " %u items deleted", numitems); } else - c->Message(0, "Usage: (targted) #nukeitem itemnum - removes the item from the player's inventory"); + c->Message(Chat::White, "Usage: (targted) #nukeitem itemnum - removes the item from the player's inventory"); } void command_peekinv(Client *c, const Seperator *sep) @@ -3000,7 +3000,7 @@ void command_peekinv(Client *c, const Seperator *sep) return; if (c->GetTarget() && !c->GetTarget()->IsClient()) { - c->Message(0, "You must target a PC for this command."); + c->Message(Chat::White, "You must target a PC for this command."); return; } @@ -3021,9 +3021,9 @@ void command_peekinv(Client *c, const Seperator *sep) else if (strcasecmp(sep->arg[1], "world") == 0) { scopeMask |= peekWorld; } if (!scopeMask) { - c->Message(0, "Usage: #peekinv [equip|gen|cursor|poss|limbo|curlim|trib|bank|shbank|allbank|trade|world|all]"); - c->Message(0, "- Displays a portion of the targeted user's inventory"); - c->Message(0, "- Caution: 'all' is a lot of information!"); + c->Message(Chat::White, "Usage: #peekinv [equip|gen|cursor|poss|limbo|curlim|trib|bank|shbank|allbank|trade|world|all]"); + c->Message(Chat::White, "- Displays a portion of the targeted user's inventory"); + c->Message(Chat::White, "- Caution: 'all' is a lot of information!"); return; } @@ -3039,7 +3039,7 @@ void command_peekinv(Client *c, const Seperator *sep) EQEmu::SayLinkEngine linker; linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); - c->Message(0, "Displaying inventory for %s...", targetClient->GetName()); + c->Message(Chat::White, "Displaying inventory for %s...", targetClient->GetName()); Object* objectTradeskill = targetClient->GetTradeskillObject(); @@ -3051,11 +3051,11 @@ void command_peekinv(Client *c, const Seperator *sep) if (scopeBit & peekWorld) { if (objectTradeskill == nullptr) { - c->Message(1, "No world tradeskill object selected..."); + c->Message(Chat::Default, "No world tradeskill object selected..."); continue; } else { - c->Message(0, "[WorldObject DBID: %i (entityid: %i)]", objectTradeskill->GetDBID(), objectTradeskill->GetID()); + c->Message(Chat::White, "[WorldObject DBID: %i (entityid: %i)]", objectTradeskill->GetDBID(), objectTradeskill->GetID()); } } @@ -3259,7 +3259,7 @@ void command_peekinv(Client *c, const Seperator *sep) } if (!itemsFound) - c->Message(0, "No items found."); + c->Message(Chat::White, "No items found."); } void command_interrogateinv(Client *c, const Seperator *sep) @@ -3278,14 +3278,14 @@ void command_interrogateinv(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "help") == 0) { if (c->Admin() < commandInterrogateInv) { - c->Message(0, "Usage: #interrogateinv"); - c->Message(0, " Displays your inventory's current in-memory nested storage references"); + c->Message(Chat::White, "Usage: #interrogateinv"); + c->Message(Chat::White, " Displays your inventory's current in-memory nested storage references"); } else { - c->Message(0, "Usage: #interrogateinv [log] [silent]"); - c->Message(0, " Displays your or your Player target inventory's current in-memory nested storage references"); - c->Message(0, " [log] - Logs interrogation to file"); - c->Message(0, " [silent] - Omits the in-game message portion of the interrogation"); + c->Message(Chat::White, "Usage: #interrogateinv [log] [silent]"); + c->Message(Chat::White, " Displays your or your Player target inventory's current in-memory nested storage references"); + c->Message(Chat::White, " [log] - Logs interrogation to file"); + c->Message(Chat::White, " [silent] - Omits the in-game message portion of the interrogation"); } return; } @@ -3314,7 +3314,7 @@ void command_interrogateinv(Client *c, const Seperator *sep) target = c->GetTarget()->CastToClient(); } else { - c->Message(1, "Use of this command is limited to Client entities"); + c->Message(Chat::Default, "Use of this command is limited to Client entities"); return; } @@ -3413,7 +3413,7 @@ void command_invsnapshot(Client *c, const Seperator *sep) if (strcmp(sep->arg[1], "gcount") == 0) { auto is_count = database.CountInvSnapshots(); - c->Message(0, "There %s %i inventory snapshot%s.", (is_count == 1 ? "is" : "are"), is_count, (is_count == 1 ? "" : "s")); + c->Message(Chat::White, "There %s %i inventory snapshot%s.", (is_count == 1 ? "is" : "are"), is_count, (is_count == 1 ? "" : "s")); return; } @@ -3421,11 +3421,11 @@ void command_invsnapshot(Client *c, const Seperator *sep) if (strcmp(sep->arg[1], "gclear") == 0) { if (strcmp(sep->arg[2], "now") == 0) { database.ClearInvSnapshots(true); - c->Message(0, "Inventory snapshots cleared using current time."); + c->Message(Chat::White, "Inventory snapshots cleared using current time."); } else { database.ClearInvSnapshots(); - c->Message(0, "Inventory snapshots cleared using RuleI(Character, InvSnapshotHistoryD) (%i day%s).", + c->Message(Chat::White, "Inventory snapshots cleared using RuleI(Character, InvSnapshotHistoryD) (%i day%s).", RuleI(Character, InvSnapshotHistoryD), (RuleI(Character, InvSnapshotHistoryD) == 1 ? "" : "s")); } @@ -3434,7 +3434,7 @@ void command_invsnapshot(Client *c, const Seperator *sep) } if (!c->GetTarget() || !c->GetTarget()->IsClient()) { - c->Message(0, "Target must be a client."); + c->Message(Chat::White, "Target must be a client."); return; } @@ -3443,12 +3443,12 @@ void command_invsnapshot(Client *c, const Seperator *sep) if (strcmp(sep->arg[1], "capture") == 0) { if (database.SaveCharacterInvSnapshot(tc->CharacterID())) { tc->SetNextInvSnapshot(RuleI(Character, InvSnapshotMinIntervalM)); - c->Message(0, "Successful inventory snapshot taken of %s - setting next interval for %i minute%s.", + c->Message(Chat::White, "Successful inventory snapshot taken of %s - setting next interval for %i minute%s.", tc->GetName(), RuleI(Character, InvSnapshotMinIntervalM), (RuleI(Character, InvSnapshotMinIntervalM) == 1 ? "" : "s")); } else { tc->SetNextInvSnapshot(RuleI(Character, InvSnapshotMinRetryM)); - c->Message(0, "Failed to take inventory snapshot of %s - retrying in %i minute%s.", + c->Message(Chat::White, "Failed to take inventory snapshot of %s - retrying in %i minute%s.", tc->GetName(), RuleI(Character, InvSnapshotMinRetryM), (RuleI(Character, InvSnapshotMinRetryM) == 1 ? "" : "s")); } @@ -3458,7 +3458,7 @@ void command_invsnapshot(Client *c, const Seperator *sep) if (c->Admin() >= commandInvSnapshot) { if (strcmp(sep->arg[1], "count") == 0) { auto is_count = database.CountCharacterInvSnapshots(tc->CharacterID()); - c->Message(0, "%s (id: %u) has %i inventory snapshot%s.", tc->GetName(), tc->CharacterID(), is_count, (is_count == 1 ? "" : "s")); + c->Message(Chat::White, "%s (id: %u) has %i inventory snapshot%s.", tc->GetName(), tc->CharacterID(), is_count, (is_count == 1 ? "" : "s")); return; } @@ -3466,11 +3466,11 @@ void command_invsnapshot(Client *c, const Seperator *sep) if (strcmp(sep->arg[1], "clear") == 0) { if (strcmp(sep->arg[2], "now") == 0) { database.ClearCharacterInvSnapshots(tc->CharacterID(), true); - c->Message(0, "%s\'s (id: %u) inventory snapshots cleared using current time.", tc->GetName(), tc->CharacterID()); + c->Message(Chat::White, "%s\'s (id: %u) inventory snapshots cleared using current time.", tc->GetName(), tc->CharacterID()); } else { database.ClearCharacterInvSnapshots(tc->CharacterID()); - c->Message(0, "%s\'s (id: %u) inventory snapshots cleared using RuleI(Character, InvSnapshotHistoryD) (%i day%s).", + c->Message(Chat::White, "%s\'s (id: %u) inventory snapshots cleared using RuleI(Character, InvSnapshotHistoryD) (%i day%s).", tc->GetName(), tc->CharacterID(), RuleI(Character, InvSnapshotHistoryD), (RuleI(Character, InvSnapshotHistoryD) == 1 ? "" : "s")); } @@ -3482,7 +3482,7 @@ void command_invsnapshot(Client *c, const Seperator *sep) database.ListCharacterInvSnapshots(tc->CharacterID(), is_list); if (is_list.empty()) { - c->Message(0, "No inventory snapshots for %s (id: %u)", tc->GetName(), tc->CharacterID()); + c->Message(Chat::White, "No inventory snapshots for %s (id: %u)", tc->GetName(), tc->CharacterID()); return; } @@ -3528,14 +3528,14 @@ void command_invsnapshot(Client *c, const Seperator *sep) if (strcmp(sep->arg[1], "parse") == 0) { if (!sep->IsNumber(2)) { - c->Message(0, "A timestamp is required to use this option."); + c->Message(Chat::White, "A timestamp is required to use this option."); return; } uint32 timestamp = atoul(sep->arg[2]); if (!database.ValidateCharacterInvSnapshotTimestamp(tc->CharacterID(), timestamp)) { - c->Message(0, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); + c->Message(Chat::White, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); return; } @@ -3554,7 +3554,7 @@ void command_invsnapshot(Client *c, const Seperator *sep) window_text.append(window_line); } else { - c->Message(0, "Too many snapshot entries to list..."); + c->Message(Chat::White, "Too many snapshot entries to list..."); break; } } @@ -3566,14 +3566,14 @@ void command_invsnapshot(Client *c, const Seperator *sep) if (strcmp(sep->arg[1], "compare") == 0) { if (!sep->IsNumber(2)) { - c->Message(0, "A timestamp is required to use this option."); + c->Message(Chat::White, "A timestamp is required to use this option."); return; } uint32 timestamp = atoul(sep->arg[2]); if (!database.ValidateCharacterInvSnapshotTimestamp(tc->CharacterID(), timestamp)) { - c->Message(0, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); + c->Message(Chat::White, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); return; } @@ -3624,7 +3624,7 @@ void command_invsnapshot(Client *c, const Seperator *sep) window_text.append(window_line); } else { - c->Message(0, "Too many comparison entries to list..."); + c->Message(Chat::White, "Too many comparison entries to list..."); break; } } @@ -3636,14 +3636,14 @@ void command_invsnapshot(Client *c, const Seperator *sep) if (strcmp(sep->arg[1], "restore") == 0) { if (!sep->IsNumber(2)) { - c->Message(0, "A timestamp is required to use this option."); + c->Message(Chat::White, "A timestamp is required to use this option."); return; } uint32 timestamp = atoul(sep->arg[2]); if (!database.ValidateCharacterInvSnapshotTimestamp(tc->CharacterID(), timestamp)) { - c->Message(0, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); + c->Message(Chat::White, "No inventory snapshots for %s (id: %u) exist at %u.", tc->GetName(), tc->CharacterID(), timestamp); return; } @@ -3660,7 +3660,7 @@ void command_invsnapshot(Client *c, const Seperator *sep) // cannot delete all valid item slots from client..so, we worldkick tc->WorldKick(); // self restores update before the 'kick' is processed - c->Message(0, "Successfully applied snapshot %u to %s's (id: %u) inventory.", + c->Message(Chat::White, "Successfully applied snapshot %u to %s's (id: %u) inventory.", timestamp, tc->GetName(), tc->CharacterID()); } else { @@ -3676,7 +3676,7 @@ void command_invsnapshot(Client *c, const Seperator *sep) void command_findnpctype(Client *c, const Seperator *sep) { if(sep->arg[1][0] == 0) { - c->Message(0, "Usage: #findnpctype [search criteria]"); + c->Message(Chat::White, "Usage: #findnpctype [search criteria]"); return; } @@ -3721,7 +3721,7 @@ void command_findnpctype(Client *c, const Seperator *sep) void command_findzone(Client *c, const Seperator *sep) { if(sep->arg[1][0] == 0) { - c->Message(0, "Usage: #findzone [search criteria]"); + c->Message(Chat::White, "Usage: #findzone [search criteria]"); return; } @@ -3768,27 +3768,27 @@ void command_findzone(Client *c, const Seperator *sep) void command_viewnpctype(Client *c, const Seperator *sep) { if (!sep->IsNumber(1)) - c->Message(0, "Usage: #viewnpctype [npctype id]"); + c->Message(Chat::White, "Usage: #viewnpctype [npctype id]"); else { uint32 npctypeid=atoi(sep->arg[1]); const NPCType* npct = database.LoadNPCTypesData(npctypeid); if (npct) { - c->Message(0, " NPCType Info, "); - c->Message(0, " NPCTypeID: %u", npct->npc_id); - c->Message(0, " Name: %s", npct->name); - c->Message(0, " Level: %i", npct->level); - c->Message(0, " Race: %i", npct->race); - c->Message(0, " Class: %i", npct->class_); - c->Message(0, " MinDmg: %i", npct->min_dmg); - c->Message(0, " MaxDmg: %i", npct->max_dmg); - c->Message(0, " Special Abilities: %s", npct->special_abilities); - c->Message(0, " Spells: %i", npct->npc_spells_id); - c->Message(0, " Loot Table: %i", npct->loottable_id); - c->Message(0, " NPCFactionID: %i", npct->npc_faction_id); + c->Message(Chat::White, " NPCType Info, "); + c->Message(Chat::White, " NPCTypeID: %u", npct->npc_id); + c->Message(Chat::White, " Name: %s", npct->name); + c->Message(Chat::White, " Level: %i", npct->level); + c->Message(Chat::White, " Race: %i", npct->race); + c->Message(Chat::White, " Class: %i", npct->class_); + c->Message(Chat::White, " MinDmg: %i", npct->min_dmg); + c->Message(Chat::White, " MaxDmg: %i", npct->max_dmg); + c->Message(Chat::White, " Special Abilities: %s", npct->special_abilities); + c->Message(Chat::White, " Spells: %i", npct->npc_spells_id); + c->Message(Chat::White, " Loot Table: %i", npct->loottable_id); + c->Message(Chat::White, " NPCFactionID: %i", npct->npc_faction_id); } else - c->Message(0, "NPC #%d not found", npctypeid); + c->Message(Chat::White, "NPC #%d not found", npctypeid); } } @@ -3796,13 +3796,13 @@ void command_reloadqst(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) { - c->Message(0, "Clearing quest memory cache."); + c->Message(Chat::White, "Clearing quest memory cache."); entity_list.ClearAreas(); parse->ReloadQuests(); } else { - c->Message(0, "Clearing quest memory cache and stopping timers."); + c->Message(Chat::White, "Clearing quest memory cache and stopping timers."); entity_list.ClearAreas(); parse->ReloadQuests(true); } @@ -3816,7 +3816,7 @@ void command_corpsefix(Client *c, const Seperator *sep) void command_reloadworld(Client *c, const Seperator *sep) { - c->Message(0, "Reloading quest cache and repopping zones worldwide."); + c->Message(Chat::White, "Reloading quest cache and repopping zones worldwide."); auto pack = new ServerPacket(ServerOP_ReloadWorld, sizeof(ReloadWorld_Struct)); ReloadWorld_Struct* RW = (ReloadWorld_Struct*) pack->pBuffer; RW->Option = ((atoi(sep->arg[1]) == 1) ? 1 : 0); @@ -3845,15 +3845,15 @@ void command_reloadlevelmods(Client *c, const Seperator *sep) void command_reloadzps(Client *c, const Seperator *sep) { database.LoadStaticZonePoints(&zone->zone_point_list, zone->GetShortName(), zone->GetInstanceVersion()); - c->Message(0, "Reloading server zone_points."); + c->Message(Chat::White, "Reloading server zone_points."); } void command_zoneshutdown(Client *c, const Seperator *sep) { if (!worldserver.Connected()) - c->Message(0, "Error: World server disconnected"); + c->Message(Chat::White, "Error: World server disconnected"); else if (sep->arg[1][0] == 0) - c->Message(0, "Usage: #zoneshutdown zoneshortname"); + c->Message(Chat::White, "Usage: #zoneshutdown zoneshortname"); else { auto pack = new ServerPacket(ServerOP_ZoneShutdown, sizeof(ServerZoneStateChange_struct)); ServerZoneStateChange_struct* s = (ServerZoneStateChange_struct *) pack->pBuffer; @@ -3870,9 +3870,9 @@ void command_zoneshutdown(Client *c, const Seperator *sep) void command_zonebootup(Client *c, const Seperator *sep) { if (!worldserver.Connected()) - c->Message(0, "Error: World server disconnected"); + c->Message(Chat::White, "Error: World server disconnected"); else if (sep->arg[2][0] == 0) { - c->Message(0, "Usage: #zonebootup ZoneServerID# zoneshortname"); + c->Message(Chat::White, "Usage: #zonebootup ZoneServerID# zoneshortname"); } else { auto pack = new ServerPacket(ServerOP_ZoneBootup, sizeof(ServerZoneStateChange_struct)); @@ -3889,20 +3889,20 @@ void command_zonebootup(Client *c, const Seperator *sep) void command_kick(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) - c->Message(0, "Usage: #kick [charname]"); + c->Message(Chat::White, "Usage: #kick [charname]"); else { Client* client = entity_list.GetClientByName(sep->arg[1]); if (client != 0) { if (client->Admin() <= c->Admin()) { - client->Message(0, "You have been kicked by %s", c->GetName()); + client->Message(Chat::White, "You have been kicked by %s", c->GetName()); auto outapp = new EQApplicationPacket(OP_GMKick, 0); client->QueuePacket(outapp); client->Kick("Ordered kicked by command"); - c->Message(0, "Kick: local: kicking %s", sep->arg[1]); + c->Message(Chat::White, "Kick: local: kicking %s", sep->arg[1]); } } else if (!worldserver.Connected()) - c->Message(0, "Error: World server disconnected"); + c->Message(Chat::White, "Error: World server disconnected"); else { auto pack = new ServerPacket(ServerOP_KickPlayer, sizeof(ServerKickPlayer_Struct)); ServerKickPlayer_Struct* skp = (ServerKickPlayer_Struct*) pack->pBuffer; @@ -3922,10 +3922,10 @@ void command_attack(Client *c, const Seperator *sep) if (sictar) c->GetTarget()->CastToNPC()->AddToHateList(sictar, 1, 0); else - c->Message(0, "Error: %s not found", sep->arg[1]); + c->Message(Chat::White, "Error: %s not found", sep->arg[1]); } else - c->Message(0, "Usage: (needs NPC targeted) #attack targetname"); + c->Message(Chat::White, "Usage: (needs NPC targeted) #attack targetname"); } void command_lock(Client *c, const Seperator *sep) @@ -4027,7 +4027,7 @@ void command_equipitem(Client *c, const Seperator *sep) // di->to_slot = 0xFFFFFFFF; // di->number_in_stack = 0xFFFFFFFF; - // c->Message(0, "Deleting %i charges from stack", movecount); // debug line..delete + // c->Message(Chat::White, "Deleting %i charges from stack", movecount); // debug line..delete // for (int16 deletecount=0; deletecount < movecount; deletecount++) // have to use 'movecount' because mi->number_in_stack is 'ENCODED' at this point (i.e., 99 charges returns 22...) @@ -4049,7 +4049,7 @@ void command_equipitem(Client *c, const Seperator *sep) c->Message(Chat::Red, "Error: Item on your cursor cannot be equipped"); } else - c->Message(0, "Usage: #equipitem slotid[0-21] - equips the item on your cursor to the position"); + c->Message(Chat::White, "Usage: #equipitem slotid[0-21] - equips the item on your cursor to the position"); } void command_zonelock(Client *c, const Seperator *sep) @@ -4069,7 +4069,7 @@ void command_zonelock(Client *c, const Seperator *sep) worldserver.SendPacket(pack); } else - c->Message(0, "Usage: #zonelock lock [zonename]"); + c->Message(Chat::White, "Usage: #zonelock lock [zonename]"); } else if (strcasecmp(sep->arg[1], "unlock") == 0 && c->Admin() >= commandLockZones) { uint16 tmp = database.GetZoneID(sep->arg[2]); @@ -4079,15 +4079,15 @@ void command_zonelock(Client *c, const Seperator *sep) worldserver.SendPacket(pack); } else - c->Message(0, "Usage: #zonelock unlock [zonename]"); + c->Message(Chat::White, "Usage: #zonelock unlock [zonename]"); } else { - c->Message(0, "#zonelock sub-commands"); - c->Message(0, " list"); + c->Message(Chat::White, "#zonelock sub-commands"); + c->Message(Chat::White, " list"); if(c->Admin() >= commandLockZones) { - c->Message(0, " lock [zonename]"); - c->Message(0, " unlock [zonename]"); + c->Message(Chat::White, " lock [zonename]"); + c->Message(Chat::White, " unlock [zonename]"); } } safe_delete(pack); @@ -4100,24 +4100,24 @@ void command_corpse(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "DeletePlayerCorpses") == 0 && c->Admin() >= commandEditPlayerCorpses) { int32 tmp = entity_list.DeletePlayerCorpses(); if (tmp >= 0) - c->Message(0, "%i corpses deleted.", tmp); + c->Message(Chat::White, "%i corpses deleted.", tmp); else - c->Message(0, "DeletePlayerCorpses Error #%i", tmp); + c->Message(Chat::White, "DeletePlayerCorpses Error #%i", tmp); } else if (strcasecmp(sep->arg[1], "delete") == 0) { if (target == 0 || !target->IsCorpse()) - c->Message(0, "Error: Target the corpse you wish to delete"); + c->Message(Chat::White, "Error: Target the corpse you wish to delete"); else if (target->IsNPCCorpse()) { - c->Message(0, "Depoping %s.", target->GetName()); + c->Message(Chat::White, "Depoping %s.", target->GetName()); target->CastToCorpse()->Delete(); } else if (c->Admin() >= commandEditPlayerCorpses) { - c->Message(0, "Deleting %s.", target->GetName()); + c->Message(Chat::White, "Deleting %s.", target->GetName()); target->CastToCorpse()->Delete(); } else - c->Message(0, "Insufficient status to delete player corpse."); + c->Message(Chat::White, "Insufficient status to delete player corpse."); } else if (strcasecmp(sep->arg[1], "ListNPC") == 0) { entity_list.ListNPCCorpses(c); @@ -4128,101 +4128,101 @@ void command_corpse(Client *c, const Seperator *sep) else if (strcasecmp(sep->arg[1], "DeleteNPCCorpses") == 0) { int32 tmp = entity_list.DeleteNPCCorpses(); if (tmp >= 0) - c->Message(0, "%d corpses deleted.", tmp); + c->Message(Chat::White, "%d corpses deleted.", tmp); else - c->Message(0, "DeletePlayerCorpses Error #%d", tmp); + c->Message(Chat::White, "DeletePlayerCorpses Error #%d", tmp); } else if (strcasecmp(sep->arg[1], "charid") == 0 && c->Admin() >= commandEditPlayerCorpses) { if (target == 0 || !target->IsPlayerCorpse()) - c->Message(0, "Error: Target must be a player corpse."); + c->Message(Chat::White, "Error: Target must be a player corpse."); else if (!sep->IsNumber(2)) - c->Message(0, "Error: charid must be a number."); + c->Message(Chat::White, "Error: charid must be a number."); else - c->Message(0, "Setting CharID=%u on PlayerCorpse '%s'", target->CastToCorpse()->SetCharID(atoi(sep->arg[2])), target->GetName()); + c->Message(Chat::White, "Setting CharID=%u on PlayerCorpse '%s'", target->CastToCorpse()->SetCharID(atoi(sep->arg[2])), target->GetName()); } else if (strcasecmp(sep->arg[1], "ResetLooter") == 0) { if (target == 0 || !target->IsCorpse()) - c->Message(0, "Error: Target the corpse you wish to reset"); + c->Message(Chat::White, "Error: Target the corpse you wish to reset"); else target->CastToCorpse()->ResetLooter(); } else if (strcasecmp(sep->arg[1], "RemoveCash") == 0) { if (target == 0 || !target->IsCorpse()) - c->Message(0, "Error: Target the corpse you wish to remove the cash from"); + c->Message(Chat::White, "Error: Target the corpse you wish to remove the cash from"); else if (!target->IsPlayerCorpse() || c->Admin() >= commandEditPlayerCorpses) { - c->Message(0, "Removing Cash from %s.", target->GetName()); + c->Message(Chat::White, "Removing Cash from %s.", target->GetName()); target->CastToCorpse()->RemoveCash(); } else - c->Message(0, "Insufficient status to modify player corpse."); + c->Message(Chat::White, "Insufficient status to modify player corpse."); } else if (strcasecmp(sep->arg[1], "InspectLoot") == 0) { if (target == 0 || !target->IsCorpse()) - c->Message(0, "Error: Target must be a corpse."); + c->Message(Chat::White, "Error: Target must be a corpse."); else target->CastToCorpse()->QueryLoot(c); } else if (strcasecmp(sep->arg[1], "lock") == 0) { if (target == 0 || !target->IsCorpse()) - c->Message(0, "Error: Target must be a corpse."); + c->Message(Chat::White, "Error: Target must be a corpse."); else { target->CastToCorpse()->Lock(); - c->Message(0, "Locking %s...", target->GetName()); + c->Message(Chat::White, "Locking %s...", target->GetName()); } } else if (strcasecmp(sep->arg[1], "unlock") == 0) { if (target == 0 || !target->IsCorpse()) - c->Message(0, "Error: Target must be a corpse."); + c->Message(Chat::White, "Error: Target must be a corpse."); else { target->CastToCorpse()->UnLock(); - c->Message(0, "Unlocking %s...", target->GetName()); + c->Message(Chat::White, "Unlocking %s...", target->GetName()); } } else if (strcasecmp(sep->arg[1], "depop") == 0) { if (target == 0 || !target->IsPlayerCorpse()) - c->Message(0, "Error: Target must be a player corpse."); + c->Message(Chat::White, "Error: Target must be a player corpse."); else if (c->Admin() >= commandEditPlayerCorpses && target->IsPlayerCorpse()) { - c->Message(0, "Depoping %s.", target->GetName()); + c->Message(Chat::White, "Depoping %s.", target->GetName()); target->CastToCorpse()->DepopPlayerCorpse(); if(!sep->arg[2][0] || atoi(sep->arg[2]) != 0) target->CastToCorpse()->Bury(); } else - c->Message(0, "Insufficient status to depop player corpse."); + c->Message(Chat::White, "Insufficient status to depop player corpse."); } else if (strcasecmp(sep->arg[1], "depopall") == 0) { if (target == 0 || !target->IsClient()) - c->Message(0, "Error: Target must be a player."); + c->Message(Chat::White, "Error: Target must be a player."); else if (c->Admin() >= commandEditPlayerCorpses && target->IsClient()) { - c->Message(0, "Depoping %s\'s corpses.", target->GetName()); + c->Message(Chat::White, "Depoping %s\'s corpses.", target->GetName()); target->CastToClient()->DepopAllCorpses(); if(!sep->arg[2][0] || atoi(sep->arg[2]) != 0) target->CastToClient()->BuryPlayerCorpses(); } else - c->Message(0, "Insufficient status to depop player corpse."); + c->Message(Chat::White, "Insufficient status to depop player corpse."); } else if (sep->arg[1][0] == 0 || strcasecmp(sep->arg[1], "help") == 0) { - c->Message(0, "#Corpse Sub-Commands:"); - c->Message(0, " DeleteNPCCorpses"); - c->Message(0, " Delete - Delete targetted corpse"); - c->Message(0, " ListNPC"); - c->Message(0, " ListPlayer"); - c->Message(0, " Lock - GM locks the corpse - cannot be looted by non-GM"); - c->Message(0, " UnLock"); - c->Message(0, " RemoveCash"); - c->Message(0, " InspectLoot"); - c->Message(0, " [to remove items from corpses, loot them]"); - c->Message(0, "Lead-GM status required to delete/modify player corpses"); - c->Message(0, " DeletePlayerCorpses"); - c->Message(0, " CharID [charid] - change player corpse's owner"); - c->Message(0, " Depop [bury] - Depops single target corpse."); - c->Message(0, " Depopall [bury] - Depops all target player's corpses."); - c->Message(0, "Set bury to 0 to skip burying the corpses."); + c->Message(Chat::White, "#Corpse Sub-Commands:"); + c->Message(Chat::White, " DeleteNPCCorpses"); + c->Message(Chat::White, " Delete - Delete targetted corpse"); + c->Message(Chat::White, " ListNPC"); + c->Message(Chat::White, " ListPlayer"); + c->Message(Chat::White, " Lock - GM locks the corpse - cannot be looted by non-GM"); + c->Message(Chat::White, " UnLock"); + c->Message(Chat::White, " RemoveCash"); + c->Message(Chat::White, " InspectLoot"); + c->Message(Chat::White, " [to remove items from corpses, loot them]"); + c->Message(Chat::White, "Lead-GM status required to delete/modify player corpses"); + c->Message(Chat::White, " DeletePlayerCorpses"); + c->Message(Chat::White, " CharID [charid] - change player corpse's owner"); + c->Message(Chat::White, " Depop [bury] - Depops single target corpse."); + c->Message(Chat::White, " Depopall [bury] - Depops all target player's corpses."); + c->Message(Chat::White, "Set bury to 0 to skip burying the corpses."); } else - c->Message(0, "Error, #corpse sub-command not found"); + c->Message(Chat::White, "Error, #corpse sub-command not found"); } void command_fixmob(Client *c, const Seperator *sep) @@ -4231,9 +4231,9 @@ void command_fixmob(Client *c, const Seperator *sep) const char* Usage = "Usage: #fixmob [race|gender|texture|helm|face|hair|haircolor|beard|beardcolor|heritage|tattoo|detail] [next|prev]"; if (!sep->arg[1]) - c->Message(0,Usage); + c->Message(Chat::White,Usage); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { @@ -4435,7 +4435,7 @@ void command_fixmob(Client *c, const Seperator *sep) if (ChangeType == nullptr) { - c->Message(0,Usage); + c->Message(Chat::White,Usage); } else { @@ -4443,7 +4443,7 @@ void command_fixmob(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0, "%s=%i", ChangeType, ChangeSetting); + c->Message(Chat::White, "%s=%i", ChangeType, ChangeSetting); } } } @@ -4459,19 +4459,19 @@ void command_gmspeed(Client *c, const Seperator *sep) if (sep->arg[1][0] != 0) { database.SetGMSpeed(t->AccountID(), state ? 1 : 0); - c->Message(0, "Turning GMSpeed %s for %s (zone to take effect)", state ? "On" : "Off", t->GetName()); + c->Message(Chat::White, "Turning GMSpeed %s for %s (zone to take effect)", state ? "On" : "Off", t->GetName()); } else { - c->Message(0, "Usage: #gmspeed [on/off]"); + c->Message(Chat::White, "Usage: #gmspeed [on/off]"); } } void command_gmzone(Client *c, const Seperator *sep) { if (!sep->arg[1]) { - c->Message(0, "Usage"); - c->Message(0, "-------"); - c->Message(0, "#gmzone [zone_short_name] [zone_version=0]"); + c->Message(Chat::White, "Usage"); + c->Message(Chat::White, "-------"); + c->Message(Chat::White, "#gmzone [zone_short_name] [zone_version=0]"); return; } @@ -4543,7 +4543,7 @@ void command_gmzone(Client *c, const Seperator *sep) void command_title(Client *c, const Seperator *sep) { if (sep->arg[1][0]==0) - c->Message(0, "Usage: #title [remove|text] [1 = Create row in title table] - remove or set title to 'text'"); + c->Message(Chat::White, "Usage: #title [remove|text] [1 = Create row in title table] - remove or set title to 'text'"); else { bool Save = (atoi(sep->arg[2]) == 1); @@ -4593,7 +4593,7 @@ void command_title(Client *c, const Seperator *sep) void command_titlesuffix(Client *c, const Seperator *sep) { if (sep->arg[1][0]==0) - c->Message(0, "Usage: #titlesuffix [remove|text] [1 = create row in title table] - remove or set title suffix to 'text'"); + c->Message(Chat::White, "Usage: #titlesuffix [remove|text] [1 = create row in title table] - remove or set title suffix to 'text'"); else { bool Save = (atoi(sep->arg[2]) == 1); @@ -4643,53 +4643,53 @@ void command_titlesuffix(Client *c, const Seperator *sep) void command_spellinfo(Client *c, const Seperator *sep) { if(sep->arg[1][0]==0) - c->Message(0, "Usage: #spellinfo [spell_id]"); + c->Message(Chat::White, "Usage: #spellinfo [spell_id]"); else { short int spell_id=atoi(sep->arg[1]); const struct SPDat_Spell_Struct *s=&spells[spell_id]; - c->Message(0, "Spell info for spell #%d:", spell_id); - c->Message(0, " name: %s", s->name); - c->Message(0, " player_1: %s", s->player_1); - c->Message(0, " teleport_zone: %s", s->teleport_zone); - c->Message(0, " you_cast: %s", s->you_cast); - c->Message(0, " other_casts: %s", s->other_casts); - c->Message(0, " cast_on_you: %s", s->cast_on_you); - c->Message(0, " spell_fades: %s", s->spell_fades); - c->Message(0, " range: %f", s->range); - c->Message(0, " aoerange: %f", s->aoerange); - c->Message(0, " pushback: %f", s->pushback); - c->Message(0, " pushup: %f", s->pushup); - c->Message(0, " cast_time: %d", s->cast_time); - c->Message(0, " recovery_time: %d", s->recovery_time); - c->Message(0, " recast_time: %d", s->recast_time); - c->Message(0, " buffdurationformula: %d", s->buffdurationformula); - c->Message(0, " buffduration: %d", s->buffduration); - c->Message(0, " AEDuration: %d", s->AEDuration); - c->Message(0, " mana: %d", s->mana); - c->Message(0, " base[12]: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d", s->base[0], s->base[1], s->base[2], s->base[3], s->base[4], s->base[5], s->base[6], s->base[7], s->base[8], s->base[9], s->base[10], s->base[11]); - c->Message(0, " base22[12]: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d", s->base2[0], s->base2[1], s->base2[2], s->base2[3], s->base2[4], s->base2[5], s->base2[6], s->base2[7], s->base2[8], s->base2[9], s->base2[10], s->base2[11]); - c->Message(0, " max[12]: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d", s->max[0], s->max[1], s->max[2], s->max[3], s->max[4], s->max[5], s->max[6], s->max[7], s->max[8], s->max[9], s->max[10], s->max[11]); - c->Message(0, " components[4]: %d, %d, %d, %d", s->components[0], s->components[1], s->components[2], s->components[3]); - c->Message(0, " component_counts[4]: %d, %d, %d, %d", s->component_counts[0], s->component_counts[1], s->component_counts[2], s->component_counts[3]); - c->Message(0, " NoexpendReagent[4]: %d, %d, %d, %d", s->NoexpendReagent[0], s->NoexpendReagent[1], s->NoexpendReagent[2], s->NoexpendReagent[3]); - c->Message(0, " formula[12]: 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x", s->formula[0], s->formula[1], s->formula[2], s->formula[3], s->formula[4], s->formula[5], s->formula[6], s->formula[7], s->formula[8], s->formula[9], s->formula[10], s->formula[11]); - c->Message(0, " goodEffect: %d", s->goodEffect); - c->Message(0, " Activated: %d", s->Activated); - c->Message(0, " resisttype: %d", s->resisttype); - c->Message(0, " effectid[12]: 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x", s->effectid[0], s->effectid[1], s->effectid[2], s->effectid[3], s->effectid[4], s->effectid[5], s->effectid[6], s->effectid[7], s->effectid[8], s->effectid[9], s->effectid[10], s->effectid[11]); - c->Message(0, " targettype: %d", s->targettype); - c->Message(0, " basediff: %d", s->basediff); - c->Message(0, " skill: %d", s->skill); - c->Message(0, " zonetype: %d", s->zonetype); - c->Message(0, " EnvironmentType: %d", s->EnvironmentType); - c->Message(0, " TimeOfDay: %d", s->TimeOfDay); - c->Message(0, " classes[15]: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d", + c->Message(Chat::White, "Spell info for spell #%d:", spell_id); + c->Message(Chat::White, " name: %s", s->name); + c->Message(Chat::White, " player_1: %s", s->player_1); + c->Message(Chat::White, " teleport_zone: %s", s->teleport_zone); + c->Message(Chat::White, " you_cast: %s", s->you_cast); + c->Message(Chat::White, " other_casts: %s", s->other_casts); + c->Message(Chat::White, " cast_on_you: %s", s->cast_on_you); + c->Message(Chat::White, " spell_fades: %s", s->spell_fades); + c->Message(Chat::White, " range: %f", s->range); + c->Message(Chat::White, " aoerange: %f", s->aoerange); + c->Message(Chat::White, " pushback: %f", s->pushback); + c->Message(Chat::White, " pushup: %f", s->pushup); + c->Message(Chat::White, " cast_time: %d", s->cast_time); + c->Message(Chat::White, " recovery_time: %d", s->recovery_time); + c->Message(Chat::White, " recast_time: %d", s->recast_time); + c->Message(Chat::White, " buffdurationformula: %d", s->buffdurationformula); + c->Message(Chat::White, " buffduration: %d", s->buffduration); + c->Message(Chat::White, " AEDuration: %d", s->AEDuration); + c->Message(Chat::White, " mana: %d", s->mana); + c->Message(Chat::White, " base[12]: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d", s->base[0], s->base[1], s->base[2], s->base[3], s->base[4], s->base[5], s->base[6], s->base[7], s->base[8], s->base[9], s->base[10], s->base[11]); + c->Message(Chat::White, " base22[12]: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d", s->base2[0], s->base2[1], s->base2[2], s->base2[3], s->base2[4], s->base2[5], s->base2[6], s->base2[7], s->base2[8], s->base2[9], s->base2[10], s->base2[11]); + c->Message(Chat::White, " max[12]: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d", s->max[0], s->max[1], s->max[2], s->max[3], s->max[4], s->max[5], s->max[6], s->max[7], s->max[8], s->max[9], s->max[10], s->max[11]); + c->Message(Chat::White, " components[4]: %d, %d, %d, %d", s->components[0], s->components[1], s->components[2], s->components[3]); + c->Message(Chat::White, " component_counts[4]: %d, %d, %d, %d", s->component_counts[0], s->component_counts[1], s->component_counts[2], s->component_counts[3]); + c->Message(Chat::White, " NoexpendReagent[4]: %d, %d, %d, %d", s->NoexpendReagent[0], s->NoexpendReagent[1], s->NoexpendReagent[2], s->NoexpendReagent[3]); + c->Message(Chat::White, " formula[12]: 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x", s->formula[0], s->formula[1], s->formula[2], s->formula[3], s->formula[4], s->formula[5], s->formula[6], s->formula[7], s->formula[8], s->formula[9], s->formula[10], s->formula[11]); + c->Message(Chat::White, " goodEffect: %d", s->goodEffect); + c->Message(Chat::White, " Activated: %d", s->Activated); + c->Message(Chat::White, " resisttype: %d", s->resisttype); + c->Message(Chat::White, " effectid[12]: 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x", s->effectid[0], s->effectid[1], s->effectid[2], s->effectid[3], s->effectid[4], s->effectid[5], s->effectid[6], s->effectid[7], s->effectid[8], s->effectid[9], s->effectid[10], s->effectid[11]); + c->Message(Chat::White, " targettype: %d", s->targettype); + c->Message(Chat::White, " basediff: %d", s->basediff); + c->Message(Chat::White, " skill: %d", s->skill); + c->Message(Chat::White, " zonetype: %d", s->zonetype); + c->Message(Chat::White, " EnvironmentType: %d", s->EnvironmentType); + c->Message(Chat::White, " TimeOfDay: %d", s->TimeOfDay); + c->Message(Chat::White, " classes[15]: %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d", s->classes[0], s->classes[1], s->classes[2], s->classes[3], s->classes[4], s->classes[5], s->classes[6], s->classes[7], s->classes[8], s->classes[9], s->classes[10], s->classes[11], s->classes[12], s->classes[13], s->classes[14]); - c->Message(0, " CastingAnim: %d", s->CastingAnim); - c->Message(0, " SpellAffectIndex: %d", s->SpellAffectIndex); - c->Message(0, " RecourseLink: %d", s->RecourseLink); + c->Message(Chat::White, " CastingAnim: %d", s->CastingAnim); + c->Message(Chat::White, " SpellAffectIndex: %d", s->SpellAffectIndex); + c->Message(Chat::White, " RecourseLink: %d", s->RecourseLink); } } @@ -4704,7 +4704,7 @@ void command_lastname(Client *c, const Seperator *sep) if(strlen(sep->arg[1]) <= 70) t->ChangeLastName(sep->arg[1]); else - c->Message(0, "Usage: #lastname where is less than 70 chars long"); + c->Message(Chat::White, "Usage: #lastname where is less than 70 chars long"); } void command_memspell(Client *c, const Seperator *sep) @@ -4714,7 +4714,7 @@ void command_memspell(Client *c, const Seperator *sep) if (!(sep->IsNumber(1) && sep->IsNumber(2))) { - c->Message(0, "Usage: #MemSpell slotid spellid"); + c->Message(Chat::White, "Usage: #MemSpell slotid spellid"); } else { @@ -4722,12 +4722,12 @@ void command_memspell(Client *c, const Seperator *sep) spell_id = atoi(sep->arg[2]); if (slot > EQEmu::spells::SPELL_GEM_COUNT || spell_id >= SPDAT_RECORDS) { - c->Message(0, "Error: #MemSpell: Arguement out of range"); + c->Message(Chat::White, "Error: #MemSpell: Arguement out of range"); } else { c->MemSpell(spell_id, slot); - c->Message(0, "Spell slot changed, have fun!"); + c->Message(Chat::White, "Spell slot changed, have fun!"); } } } @@ -4735,21 +4735,21 @@ void command_memspell(Client *c, const Seperator *sep) void command_save(Client *c, const Seperator *sep) { if (c->GetTarget() == 0) - c->Message(0, "Error: no target"); + c->Message(Chat::White, "Error: no target"); else if (c->GetTarget()->IsClient()) { if (c->GetTarget()->CastToClient()->Save(2)) - c->Message(0, "%s successfully saved.", c->GetTarget()->GetName()); + c->Message(Chat::White, "%s successfully saved.", c->GetTarget()->GetName()); else - c->Message(0, "Manual save for %s failed.", c->GetTarget()->GetName()); + c->Message(Chat::White, "Manual save for %s failed.", c->GetTarget()->GetName()); } else if (c->GetTarget()->IsPlayerCorpse()) { if (c->GetTarget()->CastToMob()->Save()) - c->Message(0, "%s successfully saved. (dbid=%u)", c->GetTarget()->GetName(), c->GetTarget()->CastToCorpse()->GetCorpseDBID()); + c->Message(Chat::White, "%s successfully saved. (dbid=%u)", c->GetTarget()->GetName(), c->GetTarget()->CastToCorpse()->GetCorpseDBID()); else - c->Message(0, "Manual save for %s failed.", c->GetTarget()->GetName()); + c->Message(Chat::White, "Manual save for %s failed.", c->GetTarget()->GetName()); } else - c->Message(0, "Error: target not a Client/PlayerCorpse"); + c->Message(Chat::White, "Error: target not a Client/PlayerCorpse"); } void command_showstats(Client *c, const Seperator *sep) @@ -4762,7 +4762,7 @@ void command_showstats(Client *c, const Seperator *sep) void command_showzonegloballoot(Client *c, const Seperator *sep) { - c->Message(0, "GlobalLoot for %s (%d:%d)", zone->GetShortName(), zone->GetZoneID(), zone->GetInstanceVersion()); + c->Message(Chat::White, "GlobalLoot for %s (%d:%d)", zone->GetShortName(), zone->GetZoneID(), zone->GetInstanceVersion()); zone->ShowZoneGlobalLoot(c); } @@ -4789,7 +4789,7 @@ void command_bind(Client *c, const Seperator *sep) if (c->GetTarget()->IsClient()) c->GetTarget()->CastToClient()->SetBindPoint(); else - c->Message(0, "Error: target not a Player"); + c->Message(Chat::White, "Error: target not a Player"); } else c->SetBindPoint(); } @@ -4797,9 +4797,9 @@ void command_bind(Client *c, const Seperator *sep) void command_depop(Client *c, const Seperator *sep) { if (c->GetTarget() == 0 || !(c->GetTarget()->IsNPC() || c->GetTarget()->IsNPCCorpse())) - c->Message(0, "You must have a NPC target for this command. (maybe you meant #depopzone?)"); + c->Message(Chat::White, "You must have a NPC target for this command. (maybe you meant #depopzone?)"); else { - c->Message(0, "Depoping '%s'.", c->GetTarget()->GetName()); + c->Message(Chat::White, "Depoping '%s'.", c->GetTarget()->GetName()); c->GetTarget()->Depop(); } } @@ -4807,7 +4807,7 @@ void command_depop(Client *c, const Seperator *sep) void command_depopzone(Client *c, const Seperator *sep) { zone->Depop(); - c->Message(0, "Zone depoped."); + c->Message(Chat::White, "Zone depoped."); } void command_devtools(Client *c, const Seperator *sep) @@ -4849,8 +4849,8 @@ void command_devtools(Client *c, const Seperator *sep) /** * Print menu */ - c->Message(0, "| [Devtools] Window %s", window_toggle_command.c_str()); - c->Message(0, "| [Devtools] Search %s", menu_commands_search.c_str()); + c->Message(Chat::White, "| [Devtools] Window %s", window_toggle_command.c_str()); + c->Message(Chat::White, "| [Devtools] Search %s", menu_commands_search.c_str()); } void command_repop(Client *c, const Seperator *sep) @@ -4872,11 +4872,11 @@ void command_repop(Client *c, const Seperator *sep) auto results = database.QueryDatabase(query); iterator.Advance(); } - c->Message(0, "Zone depop: Force resetting spawn timers."); + c->Message(Chat::White, "Zone depop: Force resetting spawn timers."); } if (!sep->IsNumber(timearg)) { - c->Message(0, "Zone depopped - repopping now."); + c->Message(Chat::White, "Zone depopped - repopping now."); zone->Repop(); @@ -4885,7 +4885,7 @@ void command_repop(Client *c, const Seperator *sep) return; } - c->Message(0, "Zone depoped. Repop in %i seconds", atoi(sep->arg[timearg])); + c->Message(Chat::White, "Zone depoped. Repop in %i seconds", atoi(sep->arg[timearg])); zone->Repop(atoi(sep->arg[timearg]) * 1000); zone->spawn2_timer.Trigger(); @@ -4908,13 +4908,13 @@ void command_repopclose(Client *c, const Seperator *sep) auto results = database.QueryDatabase(query); iterator.Advance(); } - c->Message(0, "Zone depop: Force resetting spawn timers."); + c->Message(Chat::White, "Zone depop: Force resetting spawn timers."); } if (sep->IsNumber(1)) { repop_distance = atoi(sep->arg[1]); } - c->Message(0, "Zone depoped. Repopping NPC's within %i distance units", repop_distance); + c->Message(Chat::White, "Zone depoped. Repopping NPC's within %i distance units", repop_distance); zone->RepopClose(c->GetPosition(), repop_distance); } @@ -4942,7 +4942,7 @@ void command_spawnstatus(Client *c, const Seperator *sep) } else if(strcmp(sep->arg[1], "help") == 0) { - c->Message(0, "Usage: #spawnstatus <[a]ll | [d]isabled | [e]nabled | {Spawn2 ID}>"); + c->Message(Chat::White, "Usage: #spawnstatus <[a]ll | [d]isabled | [e]nabled | {Spawn2 ID}>"); } else { zone->SpawnStatus(c); @@ -4961,7 +4961,7 @@ void command_zuwcoords(Client *c, const Seperator *sep) { // modifys and resends zhdr packet if(sep->arg[1][0]==0) - c->Message(0, "Usage: #zuwcoords "); + c->Message(Chat::White, "Usage: #zuwcoords "); else { zone->newzone_data.underworld = atof(sep->arg[1]); //float newdata = atof(sep->arg[1]); @@ -4976,7 +4976,7 @@ void command_zuwcoords(Client *c, const Seperator *sep) void command_zunderworld(Client *c, const Seperator *sep) { if(sep->arg[1][0]==0) - c->Message(0, "Usage: #zunderworld "); + c->Message(Chat::White, "Usage: #zunderworld "); else { zone->newzone_data.underworld = atof(sep->arg[1]); } @@ -4986,7 +4986,7 @@ void command_zsafecoords(Client *c, const Seperator *sep) { // modifys and resends zhdr packet if(sep->arg[3][0]==0) - c->Message(0, "Usage: #zsafecoords "); + c->Message(Chat::White, "Usage: #zsafecoords "); else { zone->newzone_data.safe_x = atof(sep->arg[1]); zone->newzone_data.safe_y = atof(sep->arg[2]); @@ -5010,7 +5010,7 @@ void command_freeze(Client *c, const Seperator *sep) if (c->GetTarget() != 0) c->GetTarget()->SendAppearancePacket(AT_Anim, ANIM_FREEZE); else - c->Message(0, "ERROR: Freeze requires a target."); + c->Message(Chat::White, "ERROR: Freeze requires a target."); } void command_unfreeze(Client *c, const Seperator *sep) @@ -5018,7 +5018,7 @@ void command_unfreeze(Client *c, const Seperator *sep) if (c->GetTarget() != 0) c->GetTarget()->SendAppearancePacket(AT_Anim, ANIM_STAND); else - c->Message(0, "ERROR: Unfreeze requires a target."); + c->Message(Chat::White, "ERROR: Unfreeze requires a target."); } void command_push(Client *c, const Seperator *sep) @@ -5028,7 +5028,7 @@ void command_push(Client *c, const Seperator *sep) t = c->GetTarget(); if (!sep->arg[1] || !sep->IsNumber(1)) { - c->Message(0, "ERROR: Must provide at least a push back."); + c->Message(Chat::White, "ERROR: Must provide at least a push back."); return; } @@ -5051,7 +5051,7 @@ void command_push(Client *c, const Seperator *sep) void command_proximity(Client *c, const Seperator *sep) { if (!c->GetTarget() && !c->GetTarget()->IsNPC()) { - c->Message(0, "You must target an NPC"); + c->Message(Chat::White, "You must target an NPC"); return; } @@ -5130,10 +5130,10 @@ void command_pvp(Client *c, const Seperator *sep) if(sep->arg[1][0] != 0) { t->SetPVP(state); - c->Message(0, "%s now follows the ways of %s.", t->GetName(), state?"discord":"order"); + c->Message(Chat::White, "%s now follows the ways of %s.", t->GetName(), state?"discord":"order"); } else - c->Message(0, "Usage: #pvp [on/off]"); + c->Message(Chat::White, "Usage: #pvp [on/off]"); } void command_setxp(Client *c, const Seperator *sep) @@ -5145,12 +5145,12 @@ void command_setxp(Client *c, const Seperator *sep) if (sep->IsNumber(1)) { if (atoi(sep->arg[1]) > 9999999) - c->Message(0, "Error: Value too high."); + c->Message(Chat::White, "Error: Value too high."); else t->AddEXP(atoi(sep->arg[1])); } else - c->Message(0, "Usage: #setxp number"); + c->Message(Chat::White, "Usage: #setxp number"); } void command_setpvppoints(Client *c, const Seperator *sep) @@ -5162,7 +5162,7 @@ void command_setpvppoints(Client *c, const Seperator *sep) if (sep->IsNumber(1)) { if (atoi(sep->arg[1]) > 9999999) - c->Message(0, "Error: Value too high."); + c->Message(Chat::White, "Error: Value too high."); else { t->SetPVPPoints(atoi(sep->arg[1])); @@ -5171,7 +5171,7 @@ void command_setpvppoints(Client *c, const Seperator *sep) } } else - c->Message(0, "Usage: #setpvppoints number"); + c->Message(Chat::White, "Usage: #setpvppoints number"); } void command_name(Client *c, const Seperator *sep) @@ -5179,16 +5179,16 @@ void command_name(Client *c, const Seperator *sep) Client *target; if( (strlen(sep->arg[1]) == 0) || (!(c->GetTarget() && c->GetTarget()->IsClient())) ) - c->Message(0, "Usage: #name newname (requires player target)"); + c->Message(Chat::White, "Usage: #name newname (requires player target)"); else { target = c->GetTarget()->CastToClient(); char *oldname = strdup(target->GetName()); if(target->ChangeFirstName(sep->arg[1], c->GetName())) { - c->Message(0, "Successfully renamed %s to %s", oldname, sep->arg[1]); + c->Message(Chat::White, "Successfully renamed %s to %s", oldname, sep->arg[1]); // until we get the name packet working right this will work - c->Message(0, "Sending player to char select."); + c->Message(Chat::White, "Sending player to char select."); target->Kick("Name was changed"); } else @@ -5203,17 +5203,17 @@ void command_tempname(Client *c, const Seperator *sep) target = c->GetTarget(); if(!target) - c->Message(0, "Usage: #tempname newname (requires a target)"); + c->Message(Chat::White, "Usage: #tempname newname (requires a target)"); else if(strlen(sep->arg[1]) > 0) { char *oldname = strdup(target->GetName()); target->TempName(sep->arg[1]); - c->Message(0, "Renamed %s to %s", oldname, sep->arg[1]); + c->Message(Chat::White, "Renamed %s to %s", oldname, sep->arg[1]); free(oldname); } else { target->TempName(); - c->Message(0, "Restored the original name"); + c->Message(Chat::White, "Restored the original name"); } } @@ -5223,34 +5223,34 @@ void command_petname(Client *c, const Seperator *sep) target = c->GetTarget(); if(!target) - c->Message(0, "Usage: #petname newname (requires a target)"); + c->Message(Chat::White, "Usage: #petname newname (requires a target)"); else if(target->IsPet() && (target->GetOwnerID() == c->GetID()) && strlen(sep->arg[1]) > 0) { char *oldname = strdup(target->GetName()); target->TempName(sep->arg[1]); - c->Message(0, "Renamed %s to %s", oldname, sep->arg[1]); + c->Message(Chat::White, "Renamed %s to %s", oldname, sep->arg[1]); free(oldname); } else { target->TempName(); - c->Message(0, "Restored the original name"); + c->Message(Chat::White, "Restored the original name"); } } void command_npcspecialattk(Client *c, const Seperator *sep) { if (c->GetTarget()==0 || c->GetTarget()->IsClient() || strlen(sep->arg[1]) <= 0 || strlen(sep->arg[2]) <= 0) - c->Message(0, "Usage: #npcspecialattk *flagchar* *permtag* (Flags are E(nrage) F(lurry) R(ampage) S(ummon), permtag is 1 = True, 0 = False)."); + c->Message(Chat::White, "Usage: #npcspecialattk *flagchar* *permtag* (Flags are E(nrage) F(lurry) R(ampage) S(ummon), permtag is 1 = True, 0 = False)."); else { c->GetTarget()->CastToNPC()->NPCSpecialAttacks(sep->arg[1],atoi(sep->arg[2])); - c->Message(0, "NPC Special Attack set."); + c->Message(Chat::White, "NPC Special Attack set."); } } void command_kill(Client *c, const Seperator *sep) { if (!c->GetTarget()) { - c->Message(0, "Error: #Kill: No target."); + c->Message(Chat::White, "Error: #Kill: No target."); } else if (!c->GetTarget()->IsClient() || c->GetTarget()->CastToClient()->Admin() <= c->Admin()) @@ -5310,23 +5310,23 @@ void command_haste(Client *c, const Seperator *sep) c->SetExtraHaste(Haste); // SetAttackTimer must be called to make this take effect, so player needs to change // the primary weapon. - c->Message(0, "Haste set to %d%% - Need to re-equip primary weapon before it takes effect", Haste); + c->Message(Chat::White, "Haste set to %d%% - Need to re-equip primary weapon before it takes effect", Haste); } else - c->Message(0, "Usage: #haste [percentage]"); + c->Message(Chat::White, "Usage: #haste [percentage]"); } void command_damage(Client *c, const Seperator *sep) { if (c->GetTarget()==0) - c->Message(0, "Error: #Damage: No Target."); + c->Message(Chat::White, "Error: #Damage: No Target."); else if (!sep->IsNumber(1)) { - c->Message(0, "Usage: #damage x"); + c->Message(Chat::White, "Usage: #damage x"); } else { int32 nkdmg = atoi(sep->arg[1]); if (nkdmg > 2100000000) - c->Message(0, "Enter a value less then 2,100,000,000."); + c->Message(Chat::White, "Enter a value less then 2,100,000,000."); else c->GetTarget()->Damage(c, nkdmg, SPELL_UNKNOWN, EQEmu::skills::SkillHandtoHand, false); } @@ -5334,7 +5334,7 @@ void command_damage(Client *c, const Seperator *sep) void command_zonespawn(Client *c, const Seperator *sep) { - c->Message(0, "This command is not yet implemented."); + c->Message(Chat::White, "This command is not yet implemented."); return; /* this was kept from client.cpp verbatim (it was commented out) */ @@ -5383,7 +5383,7 @@ void command_npcspawn(Client *c, const Seperator *sep) extra = 1; } database.NPCSpawnDB(0, zone->GetShortName(), zone->GetInstanceVersion(), c, target->CastToNPC(), extra); - c->Message(0, "%s created successfully!", target->GetName()); + c->Message(Chat::White, "%s created successfully!", target->GetName()); } else if (strcasecmp(sep->arg[1], "add") == 0) { if (atoi(sep->arg[2])) @@ -5396,42 +5396,42 @@ void command_npcspawn(Client *c, const Seperator *sep) extra = 1200; } database.NPCSpawnDB(1, zone->GetShortName(), zone->GetInstanceVersion(), c, target->CastToNPC(), extra); - c->Message(0, "%s added successfully!", target->GetName()); + c->Message(Chat::White, "%s added successfully!", target->GetName()); } else if (strcasecmp(sep->arg[1], "update") == 0) { database.NPCSpawnDB(2, zone->GetShortName(), zone->GetInstanceVersion(), c, target->CastToNPC()); - c->Message(0, "%s updated!", target->GetName()); + c->Message(Chat::White, "%s updated!", target->GetName()); } else if (strcasecmp(sep->arg[1], "remove") == 0) { database.NPCSpawnDB(3, zone->GetShortName(), zone->GetInstanceVersion(), c, target->CastToNPC()); - c->Message(0, "%s removed successfully from database!", target->GetName()); + c->Message(Chat::White, "%s removed successfully from database!", target->GetName()); target->Depop(false); } else if (strcasecmp(sep->arg[1], "delete") == 0) { database.NPCSpawnDB(4, zone->GetShortName(), zone->GetInstanceVersion(), c, target->CastToNPC()); - c->Message(0, "%s deleted from database!", target->GetName()); + c->Message(Chat::White, "%s deleted from database!", target->GetName()); target->Depop(false); } else { - c->Message(0, "Error: #npcspawn: Invalid command."); - c->Message(0, "Usage: #npcspawn [create|add|update|remove|delete]"); + c->Message(Chat::White, "Error: #npcspawn: Invalid command."); + c->Message(Chat::White, "Usage: #npcspawn [create|add|update|remove|delete]"); } } else - c->Message(0, "Error: #npcspawn: You must have a NPC targeted!"); + c->Message(Chat::White, "Error: #npcspawn: You must have a NPC targeted!"); } void command_spawnfix(Client *c, const Seperator *sep) { Mob *targetMob = c->GetTarget(); if (!targetMob || !targetMob->IsNPC()) { - c->Message(0, "Error: #spawnfix: Need an NPC target."); + c->Message(Chat::White, "Error: #spawnfix: Need an NPC target."); return; } Spawn2* s2 = targetMob->CastToNPC()->respawn2; if(!s2) { - c->Message(0, "#spawnfix FAILED -- cannot determine which spawn entry in the database this mob came from."); + c->Message(Chat::White, "#spawnfix FAILED -- cannot determine which spawn entry in the database this mob came from."); return; } @@ -5444,7 +5444,7 @@ void command_spawnfix(Client *c, const Seperator *sep) { return; } - c->Message(0, "Updating coordinates successful."); + c->Message(Chat::White, "Updating coordinates successful."); targetMob->Depop(false); } @@ -5452,7 +5452,7 @@ void command_loc(Client *c, const Seperator *sep) { Mob *t=c->GetTarget()?c->GetTarget():c->CastToMob(); - c->Message(0, "%s's Location (XYZ): %1.2f, %1.2f, %1.2f; heading=%1.1f", t->GetName(), t->GetX(), t->GetY(), t->GetZ(), t->GetHeading()); + c->Message(Chat::White, "%s's Location (XYZ): %1.2f, %1.2f, %1.2f; heading=%1.1f", t->GetName(), t->GetX(), t->GetY(), t->GetZ(), t->GetHeading()); } void command_goto(Client *c, const Seperator *sep) @@ -5513,8 +5513,8 @@ void command_goto(Client *c, const Seperator *sep) c->GetHeading()); } else { - c->Message(0, "Usage: #goto [x y z]"); - c->Message(0, "Usage: #goto [player_name]"); + c->Message(Chat::White, "Usage: #goto [x y z]"); + c->Message(Chat::White, "Usage: #goto [player_name]"); } } @@ -5536,41 +5536,41 @@ void command_iteminfo(Client *c, const Seperator *sep) linker.SetLinkType(EQEmu::saylink::SayLinkItemInst); linker.SetItemInst(inst); - c->Message(0, "*** Item Info for [%s] ***", linker.GenerateLink().c_str()); - c->Message(0, ">> ID: %u, ItemUseType: %u, ItemClassType: %u", item->ID, item->ItemType, item->ItemClass); - c->Message(0, ">> IDFile: '%s', IconID: %u", item->IDFile, item->Icon); - c->Message(0, ">> Size: %u, Weight: %u, Price: %u, LDoNPrice: %u", item->Size, item->Weight, item->Price, item->LDoNPrice); - c->Message(0, ">> Material: 0x%02X, Color: 0x%08X, Tint: 0x%08X, Light: 0x%02X", item->Material, item->Color, inst->GetColor(), item->Light); - c->Message(0, ">> IsLore: %s, LoreGroup: %u, Lore: '%s'", (item->LoreFlag ? "TRUE" : "FALSE"), item->LoreGroup, item->Lore); - c->Message(0, ">> NoDrop: %u, NoRent: %u, NoPet: %u, NoTransfer: %u, FVNoDrop: %u", + c->Message(Chat::White, "*** Item Info for [%s] ***", linker.GenerateLink().c_str()); + c->Message(Chat::White, ">> ID: %u, ItemUseType: %u, ItemClassType: %u", item->ID, item->ItemType, item->ItemClass); + c->Message(Chat::White, ">> IDFile: '%s', IconID: %u", item->IDFile, item->Icon); + c->Message(Chat::White, ">> Size: %u, Weight: %u, Price: %u, LDoNPrice: %u", item->Size, item->Weight, item->Price, item->LDoNPrice); + c->Message(Chat::White, ">> Material: 0x%02X, Color: 0x%08X, Tint: 0x%08X, Light: 0x%02X", item->Material, item->Color, inst->GetColor(), item->Light); + c->Message(Chat::White, ">> IsLore: %s, LoreGroup: %u, Lore: '%s'", (item->LoreFlag ? "TRUE" : "FALSE"), item->LoreGroup, item->Lore); + c->Message(Chat::White, ">> NoDrop: %u, NoRent: %u, NoPet: %u, NoTransfer: %u, FVNoDrop: %u", item->NoDrop, item->NoRent, (uint8)item->NoPet, (uint8)item->NoTransfer, item->FVNoDrop); if (item->IsClassBook()) { - c->Message(0, "*** This item is a Book (filename:'%s') ***", item->Filename); + c->Message(Chat::White, "*** This item is a Book (filename:'%s') ***", item->Filename); } else if (item->IsClassBag()) { - c->Message(0, "*** This item is a Container (%u slots) ***", item->BagSlots); + c->Message(Chat::White, "*** This item is a Container (%u slots) ***", item->BagSlots); } else { - c->Message(0, "*** This item is Common ***"); - c->Message(0, ">> Classes: %u, Races: %u, Slots: %u", item->Classes, item->Races, item->Slots); - c->Message(0, ">> ReqSkill: %u, ReqLevel: %u, RecLevel: %u", item->RecSkill, item->ReqLevel, item->RecLevel); - c->Message(0, ">> SkillModType: %u, SkillModValue: %i", item->SkillModType, item->SkillModValue); - c->Message(0, ">> BaneRaceType: %u, BaneRaceDamage: %u, BaneBodyType: %u, BaneBodyDamage: %i", + c->Message(Chat::White, "*** This item is Common ***"); + c->Message(Chat::White, ">> Classes: %u, Races: %u, Slots: %u", item->Classes, item->Races, item->Slots); + c->Message(Chat::White, ">> ReqSkill: %u, ReqLevel: %u, RecLevel: %u", item->RecSkill, item->ReqLevel, item->RecLevel); + c->Message(Chat::White, ">> SkillModType: %u, SkillModValue: %i", item->SkillModType, item->SkillModValue); + c->Message(Chat::White, ">> BaneRaceType: %u, BaneRaceDamage: %u, BaneBodyType: %u, BaneBodyDamage: %i", item->BaneDmgRace, item->BaneDmgRaceAmt, item->BaneDmgBody, item->BaneDmgAmt); - c->Message(0, ">> Magic: %s, SpellID: %i, ProcLevel: %u, Charges: %u, MaxCharges: %u", + c->Message(Chat::White, ">> Magic: %s, SpellID: %i, ProcLevel: %u, Charges: %u, MaxCharges: %u", (item->Magic ? "TRUE" : "FALSE"), item->Click.Effect, item->Click.Level, inst->GetCharges(), item->MaxCharges); - c->Message(0, ">> EffectType: 0x%02X, CastTime: %.2f", (uint8)item->Click.Type, ((double)item->CastTime / 1000)); + c->Message(Chat::White, ">> EffectType: 0x%02X, CastTime: %.2f", (uint8)item->Click.Type, ((double)item->CastTime / 1000)); } if (c->Admin() >= 200) - c->Message(0, ">> MinStatus: %u", item->MinStatus); + c->Message(Chat::White, ">> MinStatus: %u", item->MinStatus); } void command_uptime(Client *c, const Seperator *sep) { if (!worldserver.Connected()) - c->Message(0, "Error: World server disconnected"); + c->Message(Chat::White, "Error: World server disconnected"); else { auto pack = new ServerPacket(ServerOP_Uptime, sizeof(ServerUptime_Struct)); @@ -5588,31 +5588,31 @@ void command_flag(Client *c, const Seperator *sep) if(sep->arg[2][0] == 0) { if (!c->GetTarget() || (c->GetTarget() && c->GetTarget() == c)) { c->UpdateAdmin(); - c->Message(0, "Refreshed your admin flag from DB."); + c->Message(Chat::White, "Refreshed your admin flag from DB."); } else if (c->GetTarget() && c->GetTarget() != c && c->GetTarget()->IsClient()) { c->GetTarget()->CastToClient()->UpdateAdmin(); - c->Message(0, "%s's admin flag has been refreshed.", c->GetTarget()->GetName()); - c->GetTarget()->Message(0, "%s refreshed your admin flag.", c->GetName()); + c->Message(Chat::White, "%s's admin flag has been refreshed.", c->GetTarget()->GetName()); + c->GetTarget()->Message(Chat::White, "%s refreshed your admin flag.", c->GetName()); } } else if (!sep->IsNumber(1) || atoi(sep->arg[1]) < -2 || atoi(sep->arg[1]) > 255 || strlen(sep->arg[2]) == 0) - c->Message(0, "Usage: #flag [status] [acctname]"); + c->Message(Chat::White, "Usage: #flag [status] [acctname]"); else if (c->Admin() < commandChangeFlags) { //this check makes banning players by less than this level //impossible, but i'll leave it in anyways - c->Message(0, "You may only refresh your own flag, doing so now."); + c->Message(Chat::White, "You may only refresh your own flag, doing so now."); c->UpdateAdmin(); } else { if (atoi(sep->arg[1]) > c->Admin()) - c->Message(0, "You cannot set people's status to higher than your own"); + c->Message(Chat::White, "You cannot set people's status to higher than your own"); else if (atoi(sep->arg[1]) < 0 && c->Admin() < commandBanPlayers) - c->Message(0, "You have too low of status to suspend/ban"); + c->Message(Chat::White, "You have too low of status to suspend/ban"); else if (!database.SetAccountStatus(sep->argplus[2], atoi(sep->arg[1]))) - c->Message(0, "Unable to set GM Flag."); + c->Message(Chat::White, "Unable to set GM Flag."); else { - c->Message(0, "Set GM Flag on account."); + c->Message(Chat::White, "Set GM Flag on account."); auto pack = new ServerPacket(ServerOP_FlagUpdate, 6); *((uint32*) pack->pBuffer) = database.GetAccountIDByName(sep->argplus[2]); *((int16*) &pack->pBuffer[4]) = atoi(sep->arg[1]); @@ -5657,14 +5657,14 @@ void command_guild(Client *c, const Seperator *sep) Mob *target=c->GetTarget(); if (strcasecmp(sep->arg[1], "help") == 0) { - c->Message(0, "GM Guild commands:"); - c->Message(0, " #guild list - lists all guilds on the server"); - c->Message(0, " #guild create {guildleader charname or CharID} guildname"); - c->Message(0, " #guild delete guildID"); - c->Message(0, " #guild rename guildID newname"); - c->Message(0, " #guild set charname guildID (0=no guild)"); - c->Message(0, " #guild setrank charname rank"); - c->Message(0, " #guild setleader guildID {guildleader charname or CharID}"); + c->Message(Chat::White, "GM Guild commands:"); + c->Message(Chat::White, " #guild list - lists all guilds on the server"); + c->Message(Chat::White, " #guild create {guildleader charname or CharID} guildname"); + c->Message(Chat::White, " #guild delete guildID"); + c->Message(Chat::White, " #guild rename guildID newname"); + c->Message(Chat::White, " #guild set charname guildID (0=no guild)"); + c->Message(Chat::White, " #guild setrank charname rank"); + c->Message(Chat::White, " #guild setleader guildID {guildleader charname or CharID}"); } else if (strcasecmp(sep->arg[1], "status") == 0 || strcasecmp(sep->arg[1], "stat") == 0) { Client* client = 0; @@ -5673,24 +5673,24 @@ void command_guild(Client *c, const Seperator *sep) else if (target != 0 && target->IsClient()) client = target->CastToClient(); if (client == 0) - c->Message(0, "You must target someone or specify a character name"); + c->Message(Chat::White, "You must target someone or specify a character name"); else if ((client->Admin() >= minStatusToEditOtherGuilds && admin < minStatusToEditOtherGuilds) && client->GuildID() != c->GuildID()) // no peeping for GMs, make sure tell message stays the same - c->Message(0, "You must target someone or specify a character name."); + c->Message(Chat::White, "You must target someone or specify a character name."); else { if (client->IsInAGuild()) - c->Message(0, "%s is not in a guild.", client->GetName()); + c->Message(Chat::White, "%s is not in a guild.", client->GetName()); else if (guild_mgr.IsGuildLeader(client->GuildID(), client->CharacterID())) - c->Message(0, "%s is the leader of <%s> rank: %s", client->GetName(), guild_mgr.GetGuildName(client->GuildID()), guild_mgr.GetRankName(client->GuildID(), client->GuildRank())); + c->Message(Chat::White, "%s is the leader of <%s> rank: %s", client->GetName(), guild_mgr.GetGuildName(client->GuildID()), guild_mgr.GetRankName(client->GuildID(), client->GuildRank())); else - c->Message(0, "%s is a member of <%s> rank: %s", client->GetName(), guild_mgr.GetGuildName(client->GuildID()), guild_mgr.GetRankName(client->GuildID(), client->GuildRank())); + c->Message(Chat::White, "%s is a member of <%s> rank: %s", client->GetName(), guild_mgr.GetGuildName(client->GuildID()), guild_mgr.GetRankName(client->GuildID(), client->GuildRank())); } } else if (strcasecmp(sep->arg[1], "info") == 0) { if (sep->arg[2][0] == 0 && c->IsInAGuild()) { if (admin >= minStatusToEditOtherGuilds) - c->Message(0, "Usage: #guildinfo guild_id"); + c->Message(Chat::White, "Usage: #guildinfo guild_id"); else - c->Message(0, "You're not in a guild"); + c->Message(Chat::White, "You're not in a guild"); } else { uint32 tmp = GUILD_NONE; @@ -5706,19 +5706,19 @@ void command_guild(Client *c, const Seperator *sep) /* else if (strcasecmp(sep->arg[1], "edit") == 0) { if (c->GuildDBID() == 0) - c->Message(0, "You arent in a guild!"); + c->Message(Chat::White, "You arent in a guild!"); else if (!sep->IsNumber(2)) - c->Message(0, "Error: invalid rank #."); + c->Message(Chat::White, "Error: invalid rank #."); else if (atoi(sep->arg[2]) < 0 || atoi(sep->arg[2]) > GUILD_MAX_RANK) - c->Message(0, "Error: invalid rank #."); + c->Message(Chat::White, "Error: invalid rank #."); else if (!c->GuildRank() == 0) - c->Message(0, "You must be rank %s to use edit.", guilds[c->GuildEQID()].rank[0].rankname); + c->Message(Chat::White, "You must be rank %s to use edit.", guilds[c->GuildEQID()].rank[0].rankname); else if (!worldserver.Connected()) - c->Message(0, "Error: World server dirconnected"); + c->Message(Chat::White, "Error: World server dirconnected"); else { if (!helper_guild_edit(c, c->GuildDBID(), c->GuildEQID(), atoi(sep->arg[2]), sep->arg[3], sep->argplus[4])) { - c->Message(0, " #guild edit rank title newtitle"); - c->Message(0, " #guild edit rank permission 0/1"); + c->Message(Chat::White, " #guild edit rank title newtitle"); + c->Message(Chat::White, " #guild edit rank permission 0/1"); } else { ServerPacket* pack = new ServerPacket(ServerOP_RefreshGuild, 5); @@ -5731,20 +5731,20 @@ void command_guild(Client *c, const Seperator *sep) } else if (strcasecmp(sep->arg[1], "gmedit") == 0 && admin >= 100) { if (!sep->IsNumber(2)) - c->Message(0, "Error: invalid guilddbid."); + c->Message(Chat::White, "Error: invalid guilddbid."); else if (!sep->IsNumber(3)) - c->Message(0, "Error: invalid rank #."); + c->Message(Chat::White, "Error: invalid rank #."); else if (atoi(sep->arg[3]) < 0 || atoi(sep->arg[3]) > GUILD_MAX_RANK) - c->Message(0, "Error: invalid rank #."); + c->Message(Chat::White, "Error: invalid rank #."); else if (!worldserver.Connected()) - c->Message(0, "Error: World server dirconnected"); + c->Message(Chat::White, "Error: World server dirconnected"); else { uint32 eqid = database.GetGuildEQID(atoi(sep->arg[2])); if (eqid == GUILD_NONE) - c->Message(0, "Error: Guild not found"); + c->Message(Chat::White, "Error: Guild not found"); else if (!helper_guild_edit(c, atoi(sep->arg[2]), eqid, atoi(sep->arg[3]), sep->arg[4], sep->argplus[5])) { - c->Message(0, " #guild gmedit guilddbid rank title newtitle"); - c->Message(0, " #guild gmedit guilddbid rank permission 0/1"); + c->Message(Chat::White, " #guild gmedit guilddbid rank title newtitle"); + c->Message(Chat::White, " #guild gmedit guilddbid rank permission 0/1"); } else { ServerPacket* pack = new ServerPacket(ServerOP_RefreshGuild, 5); @@ -5757,7 +5757,7 @@ void command_guild(Client *c, const Seperator *sep) */ else if (strcasecmp(sep->arg[1], "set") == 0) { if (!sep->IsNumber(3)) - c->Message(0, "Usage: #guild set charname guildgbid (0 = clear guildtag)"); + c->Message(Chat::White, "Usage: #guild set charname guildgbid (0 = clear guildtag)"); else { uint32 guild_id = atoi(sep->arg[3]); @@ -5792,24 +5792,24 @@ void command_guild(Client *c, const Seperator *sep) if(!guild_mgr.SetGuild(charid, guild_id, GUILD_MEMBER)) { c->Message(Chat::Red, "Error putting '%s' into guild %d", sep->arg[2], guild_id); } else { - c->Message(0, "%s has been put into guild %d", sep->arg[2], guild_id); + c->Message(Chat::White, "%s has been put into guild %d", sep->arg[2], guild_id); } } } /*else if (strcasecmp(sep->arg[1], "setdoor") == 0 && admin >= minStatusToEditOtherGuilds) { if (!sep->IsNumber(2)) - c->Message(0, "Usage: #guild setdoor guildEQid (0 = delete guilddoor)"); + c->Message(Chat::White, "Usage: #guild setdoor guildEQid (0 = delete guilddoor)"); else { // guild doors if((!guilds[atoi(sep->arg[2])].databaseID) && (atoi(sep->arg[2])!=0) ) { - c->Message(0, "These is no guild with this guildEQid"); + c->Message(Chat::White, "These is no guild with this guildEQid"); } else { c->SetIsSettingGuildDoor(true); - c->Message(0, "Click on a door you want to become a guilddoor"); + c->Message(Chat::White, "Click on a door you want to become a guilddoor"); c->SetSetGuildDoorID(atoi(sep->arg[2])); } } @@ -5817,9 +5817,9 @@ void command_guild(Client *c, const Seperator *sep) else if (strcasecmp(sep->arg[1], "setrank") == 0) { int rank = atoi(sep->arg[3]); if (!sep->IsNumber(3)) - c->Message(0, "Usage: #guild setrank charname rank"); + c->Message(Chat::White, "Usage: #guild setrank charname rank"); else if (rank < 0 || rank > GUILD_MAX_RANK) - c->Message(0, "Error: invalid rank #."); + c->Message(Chat::White, "Error: invalid rank #."); else { uint32 charid = database.GetCharacterID(sep->arg[2]); if(charid == 0) { @@ -5839,14 +5839,14 @@ void command_guild(Client *c, const Seperator *sep) if(!guild_mgr.SetGuildRank(charid, rank)) c->Message(Chat::Red, "Error while setting rank %d on '%s'.", rank, sep->arg[2]); else - c->Message(0, "%s has been set to rank %d", sep->arg[2], rank); + c->Message(Chat::White, "%s has been set to rank %d", sep->arg[2], rank); } } else if (strcasecmp(sep->arg[1], "create") == 0) { if (sep->arg[3][0] == 0) - c->Message(0, "Usage: #guild create {guildleader charname or CharID} guild name"); + c->Message(Chat::White, "Usage: #guild create {guildleader charname or CharID} guild name"); else if (!worldserver.Connected()) - c->Message(0, "Error: World server dirconnected"); + c->Message(Chat::White, "Error: World server dirconnected"); else { uint32 leader = 0; if (sep->IsNumber(2)) { @@ -5858,13 +5858,13 @@ void command_guild(Client *c, const Seperator *sep) return; } if (leader == 0) { - c->Message(0, "Guild leader not found."); + c->Message(Chat::White, "Guild leader not found."); return; } uint32 tmp = guild_mgr.FindGuildByLeader(leader); if (tmp != GUILD_NONE) { - c->Message(0, "Error: %s already is the leader of DB# %i '%s'.", sep->arg[2], tmp, guild_mgr.GetGuildName(tmp)); + c->Message(Chat::White, "Error: %s already is the leader of DB# %i '%s'.", sep->arg[2], tmp, guild_mgr.GetGuildName(tmp)); } else { @@ -5879,12 +5879,12 @@ void command_guild(Client *c, const Seperator *sep) sep->argplus[3], leader, (unsigned long)id); if (id == GUILD_NONE) - c->Message(0, "Guild creation failed."); + c->Message(Chat::White, "Guild creation failed."); else { - c->Message(0, "Guild created: Leader: %i, number %i: %s", leader, id, sep->argplus[3]); + c->Message(Chat::White, "Guild created: Leader: %i, number %i: %s", leader, id, sep->argplus[3]); if(!guild_mgr.SetGuild(leader, id, GUILD_LEADER)) - c->Message(0, "Unable to set guild leader's guild in the database. Your going to have to run #guild set"); + c->Message(Chat::White, "Unable to set guild leader's guild in the database. Your going to have to run #guild set"); } } @@ -5892,14 +5892,14 @@ void command_guild(Client *c, const Seperator *sep) } else if (strcasecmp(sep->arg[1], "delete") == 0) { if (!sep->IsNumber(2)) - c->Message(0, "Usage: #guild delete guildID"); + c->Message(Chat::White, "Usage: #guild delete guildID"); else if (!worldserver.Connected()) - c->Message(0, "Error: World server dirconnected"); + c->Message(Chat::White, "Error: World server dirconnected"); else { uint32 id = atoi(sep->arg[2]); if(!guild_mgr.GuildExists(id)) { - c->Message(0, "Guild %d does not exist!", id); + c->Message(Chat::White, "Guild %d does not exist!", id); return; } @@ -5918,22 +5918,22 @@ void command_guild(Client *c, const Seperator *sep) guild_mgr.GetGuildName(id), id); if (!guild_mgr.DeleteGuild(id)) - c->Message(0, "Guild delete failed."); + c->Message(Chat::White, "Guild delete failed."); else { - c->Message(0, "Guild %d deleted.", id); + c->Message(Chat::White, "Guild %d deleted.", id); } } } else if (strcasecmp(sep->arg[1], "rename") == 0) { if ((!sep->IsNumber(2)) || sep->arg[3][0] == 0) - c->Message(0, "Usage: #guild rename guildID newname"); + c->Message(Chat::White, "Usage: #guild rename guildID newname"); else if (!worldserver.Connected()) - c->Message(0, "Error: World server dirconnected"); + c->Message(Chat::White, "Error: World server dirconnected"); else { uint32 id = atoi(sep->arg[2]); if(!guild_mgr.GuildExists(id)) { - c->Message(0, "Guild %d does not exist!", id); + c->Message(Chat::White, "Guild %d does not exist!", id); return; } @@ -5952,17 +5952,17 @@ void command_guild(Client *c, const Seperator *sep) guild_mgr.GetGuildName(id), id, sep->argplus[3]); if (!guild_mgr.RenameGuild(id, sep->argplus[3])) - c->Message(0, "Guild rename failed."); + c->Message(Chat::White, "Guild rename failed."); else { - c->Message(0, "Guild %d renamed to %s", id, sep->argplus[3]); + c->Message(Chat::White, "Guild %d renamed to %s", id, sep->argplus[3]); } } } else if (strcasecmp(sep->arg[1], "setleader") == 0) { if (sep->arg[3][0] == 0 || !sep->IsNumber(2)) - c->Message(0, "Usage: #guild setleader guild_id {guildleader charname or CharID}"); + c->Message(Chat::White, "Usage: #guild setleader guild_id {guildleader charname or CharID}"); else if (!worldserver.Connected()) - c->Message(0, "Error: World server dirconnected"); + c->Message(Chat::White, "Error: World server dirconnected"); else { uint32 leader = 0; if (sep->IsNumber(2)) { @@ -5976,15 +5976,15 @@ void command_guild(Client *c, const Seperator *sep) uint32 tmpdb = guild_mgr.FindGuildByLeader(leader); if (leader == 0) - c->Message(0, "New leader not found."); + c->Message(Chat::White, "New leader not found."); else if (tmpdb != 0) { - c->Message(0, "Error: %s already is the leader of guild # %i", sep->arg[2], tmpdb); + c->Message(Chat::White, "Error: %s already is the leader of guild # %i", sep->arg[2], tmpdb); } else { uint32 id = atoi(sep->arg[2]); if(!guild_mgr.GuildExists(id)) { - c->Message(0, "Guild %d does not exist!", id); + c->Message(Chat::White, "Guild %d does not exist!", id); return; } @@ -6003,9 +6003,9 @@ void command_guild(Client *c, const Seperator *sep) guild_mgr.GetGuildName(id), id, leader); if(!guild_mgr.SetGuildLeader(id, leader)) - c->Message(0, "Guild leader change failed."); + c->Message(Chat::White, "Guild leader change failed."); else { - c->Message(0, "Guild leader changed: guild # %d, Leader: %s", id, sep->argplus[3]); + c->Message(Chat::White, "Guild leader changed: guild # %d, Leader: %s", id, sep->argplus[3]); } } } @@ -6018,7 +6018,7 @@ void command_guild(Client *c, const Seperator *sep) guild_mgr.ListGuilds(c); } else { - c->Message(0, "Unknown guild command, try #guild help"); + c->Message(Chat::White, "Unknown guild command, try #guild help"); } } /* @@ -6036,12 +6036,12 @@ bool helper_guild_edit(Client *c, uint32 dbid, uint32 eqid, uint8 rank, const ch if (strcasecmp(what, "title") == 0) { if (strlen(value) > 100) - c->Message(0, "Error: Title has a maxium length of 100 characters."); + c->Message(Chat::White, "Error: Title has a maxium length of 100 characters."); else strcpy(grl.rankname, value); } else if (rank == 0) - c->Message(0, "Error: Rank 0's permissions can not be changed."); + c->Message(Chat::White, "Error: Rank 0's permissions can not be changed."); else { if (!(strlen(value) == 1 && (value[0] == '0' || value[0] == '1'))) @@ -6064,17 +6064,17 @@ bool helper_guild_edit(Client *c, uint32 dbid, uint32 eqid, uint8 rank, const ch else if (strcasecmp(what, "warpeace") == 0) grl.warpeace = (value[0] == '1'); else - c->Message(0, "Error: Permission name not recognized."); + c->Message(Chat::White, "Error: Permission name not recognized."); } if (!database.EditGuild(dbid, rank, &grl)) - c->Message(0, "Error: database.EditGuild() failed"); + c->Message(Chat::White, "Error: database.EditGuild() failed"); return true; }*/ void command_zonestatus(Client *c, const Seperator *sep) { if (!worldserver.Connected()) - c->Message(0, "Error: World server disconnected"); + c->Message(Chat::White, "Error: World server disconnected"); else { auto pack = new ServerPacket(ServerOP_ZoneStatus, strlen(c->GetName()) + 2); memset(pack->pBuffer, (uint8) c->Admin(), 1); @@ -6087,11 +6087,11 @@ void command_zonestatus(Client *c, const Seperator *sep) void command_doanim(Client *c, const Seperator *sep) { if (!sep->IsNumber(1)) - c->Message(0, "Usage: #DoAnim [number]"); + c->Message(Chat::White, "Usage: #DoAnim [number]"); else if (c->Admin() >= commandDoAnimOthers) if (c->GetTarget() == 0) - c->Message(0, "Error: You need a target."); + c->Message(Chat::White, "Error: You need a target."); else c->GetTarget()->DoAnim(atoi(sep->arg[1]),atoi(sep->arg[2])); else @@ -6102,13 +6102,13 @@ void command_randomfeatures(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!target) - c->Message(0,"Error: This command requires a target"); + c->Message(Chat::White,"Error: This command requires a target"); else { if (target->RandomizeFeatures()) - c->Message(0,"Features Randomized"); + c->Message(Chat::White,"Features Randomized"); else - c->Message(0,"This command requires a Playable Race as the target"); + c->Message(Chat::White,"This command requires a Playable Race as the target"); } } @@ -6116,9 +6116,9 @@ void command_face(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #face [number of face]"); + c->Message(Chat::White,"Usage: #face [number of face]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6139,14 +6139,14 @@ void command_face(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Face = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Face = %i", atoi(sep->arg[1])); } } void command_findaliases(Client *c, const Seperator *sep) { if (!sep->arg[1][0]) { - c->Message(0, "Usage: #findaliases [alias | command]"); + c->Message(Chat::White, "Usage: #findaliases [alias | command]"); return; } @@ -6158,30 +6158,30 @@ void command_findaliases(Client *c, const Seperator *sep) auto command_iter = commandlist.find(find_iter->second); if (find_iter->second.empty() || command_iter == commandlist.end()) { - c->Message(0, "An unknown condition occurred..."); + c->Message(Chat::White, "An unknown condition occurred..."); return; } - c->Message(0, "Available command aliases for '%s':", command_iter->first.c_str()); + c->Message(Chat::White, "Available command aliases for '%s':", command_iter->first.c_str()); int commandaliasesshown = 0; for (auto alias_iter = commandaliases.begin(); alias_iter != commandaliases.end(); ++alias_iter) { if (strcasecmp(find_iter->second.c_str(), alias_iter->second.c_str()) || c->Admin() < command_iter->second->access) continue; - c->Message(0, "%c%s", COMMAND_CHAR, alias_iter->first.c_str()); + c->Message(Chat::White, "%c%s", COMMAND_CHAR, alias_iter->first.c_str()); ++commandaliasesshown; } - c->Message(0, "%d command alias%s listed.", commandaliasesshown, commandaliasesshown != 1 ? "es" : ""); + c->Message(Chat::White, "%d command alias%s listed.", commandaliasesshown, commandaliasesshown != 1 ? "es" : ""); } void command_details(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #details [number of drakkin detail]"); + c->Message(Chat::White,"Usage: #details [number of drakkin detail]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6202,7 +6202,7 @@ void command_details(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Details = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Details = %i", atoi(sep->arg[1])); } } @@ -6210,9 +6210,9 @@ void command_heritage(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #heritage [number of Drakkin heritage]"); + c->Message(Chat::White,"Usage: #heritage [number of Drakkin heritage]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6233,7 +6233,7 @@ void command_heritage(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Heritage = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Heritage = %i", atoi(sep->arg[1])); } } @@ -6241,9 +6241,9 @@ void command_tattoo(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #tattoo [number of Drakkin tattoo]"); + c->Message(Chat::White,"Usage: #tattoo [number of Drakkin tattoo]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6264,7 +6264,7 @@ void command_tattoo(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Tattoo = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Tattoo = %i", atoi(sep->arg[1])); } } @@ -6272,9 +6272,9 @@ void command_helm(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #helm [number of helm texture]"); + c->Message(Chat::White,"Usage: #helm [number of helm texture]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6295,7 +6295,7 @@ void command_helm(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Helm = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Helm = %i", atoi(sep->arg[1])); } } @@ -6303,9 +6303,9 @@ void command_hair(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #hair [number of hair style]"); + c->Message(Chat::White,"Usage: #hair [number of hair style]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6326,7 +6326,7 @@ void command_hair(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Hair = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Hair = %i", atoi(sep->arg[1])); } } @@ -6334,9 +6334,9 @@ void command_haircolor(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #haircolor [number of hair color]"); + c->Message(Chat::White,"Usage: #haircolor [number of hair color]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6357,7 +6357,7 @@ void command_haircolor(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Hair Color = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Hair Color = %i", atoi(sep->arg[1])); } } @@ -6365,9 +6365,9 @@ void command_beard(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #beard [number of beard style]"); + c->Message(Chat::White,"Usage: #beard [number of beard style]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6388,7 +6388,7 @@ void command_beard(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Beard = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Beard = %i", atoi(sep->arg[1])); } } @@ -6396,9 +6396,9 @@ void command_beardcolor(Client *c, const Seperator *sep) { Mob *target=c->GetTarget(); if (!sep->IsNumber(1)) - c->Message(0,"Usage: #beardcolor [number of beard color]"); + c->Message(Chat::White,"Usage: #beardcolor [number of beard color]"); else if (!target) - c->Message(0,"Error: this command requires a target"); + c->Message(Chat::White,"Error: this command requires a target"); else { uint16 Race = target->GetRace(); uint8 Gender = target->GetGender(); @@ -6419,7 +6419,7 @@ void command_beardcolor(Client *c, const Seperator *sep) EyeColor1, EyeColor2, HairStyle, LuclinFace, Beard, 0xFF, DrakkinHeritage, DrakkinTattoo, DrakkinDetails); - c->Message(0,"Beard Color = %i", atoi(sep->arg[1])); + c->Message(Chat::White,"Beard Color = %i", atoi(sep->arg[1])); } } @@ -6430,7 +6430,7 @@ void command_scribespells(Client *c, const Seperator *sep) t = c->GetTarget()->CastToClient(); if(sep->argnum < 1 || !sep->IsNumber(1)) { - c->Message(0, "FORMAT: #scribespells "); + c->Message(Chat::White, "FORMAT: #scribespells "); return; } @@ -6443,17 +6443,17 @@ void command_scribespells(Client *c, const Seperator *sep) min_level = (uint8)RuleI(Character, MaxLevel); // default to Character:MaxLevel if we're not a GM & it's higher than the max level if(max_level < 1 || min_level < 1) { - c->Message(0, "ERROR: Level must be greater than 1."); + c->Message(Chat::White, "ERROR: Level must be greater than 1."); return; } if (min_level > max_level) { - c->Message(0, "ERROR: Min Level must be less than or equal to Max Level."); + c->Message(Chat::White, "ERROR: Min Level must be less than or equal to Max Level."); return; } - t->Message(0, "Scribing spells to spellbook."); + t->Message(Chat::White, "Scribing spells to spellbook."); if(t != c) - c->Message(0, "Scribing spells for %s.", t->GetName()); + c->Message(Chat::White, "Scribing spells for %s.", t->GetName()); Log(Logs::General, Logs::Normal, "Scribe spells request for %s from %s, levels: %u -> %u", t->GetName(), c->GetName(), min_level, max_level); int book_slot = t->GetNextAvailableSpellBookSlot(); @@ -6516,14 +6516,14 @@ void command_scribespells(Client *c, const Seperator *sep) } if (count > 0) { - t->Message(0, "Successfully scribed %i spells.", count); + t->Message(Chat::White, "Successfully scribed %i spells.", count); if (t != c) - c->Message(0, "Successfully scribed %i spells for %s.", count, t->GetName()); + c->Message(Chat::White, "Successfully scribed %i spells for %s.", count, t->GetName()); } else { - t->Message(0, "No spells scribed."); + t->Message(Chat::White, "No spells scribed."); if (t != c) - c->Message(0, "No spells scribed for %s.", t->GetName()); + c->Message(Chat::White, "No spells scribed for %s.", t->GetName()); } } @@ -6536,17 +6536,17 @@ void command_scribespell(Client *c, const Seperator *sep) { t=c->GetTarget()->CastToClient(); if(!sep->arg[1][0]) { - c->Message(0, "FORMAT: #scribespell "); + c->Message(Chat::White, "FORMAT: #scribespell "); return; } spell_id = atoi(sep->arg[1]); if(IsValidSpell(spell_id)) { - t->Message(0, "Scribing spell: %s (%i) to spellbook.", spells[spell_id].name, spell_id); + t->Message(Chat::White, "Scribing spell: %s (%i) to spellbook.", spells[spell_id].name, spell_id); if(t != c) - c->Message(0, "Scribing spell: %s (%i) for %s.", spells[spell_id].name, spell_id, t->GetName()); + c->Message(Chat::White, "Scribing spell: %s (%i) for %s.", spells[spell_id].name, spell_id, t->GetName()); Log(Logs::General, Logs::Normal, "Scribe spell: %s (%i) request for %s from %s.", spells[spell_id].name, spell_id, t->GetName(), c->GetName()); @@ -6578,7 +6578,7 @@ void command_unscribespell(Client *c, const Seperator *sep) { t=c->GetTarget()->CastToClient(); if(!sep->arg[1][0]) { - c->Message(0, "FORMAT: #unscribespell "); + c->Message(Chat::White, "FORMAT: #unscribespell "); return; } @@ -6590,10 +6590,10 @@ void command_unscribespell(Client *c, const Seperator *sep) { if(book_slot >= 0) { t->UnscribeSpell(book_slot); - t->Message(0, "Unscribing spell: %s (%i) from spellbook.", spells[spell_id].name, spell_id); + t->Message(Chat::White, "Unscribing spell: %s (%i) from spellbook.", spells[spell_id].name, spell_id); if(t != c) - c->Message(0, "Unscribing spell: %s (%i) for %s.", spells[spell_id].name, spell_id, t->GetName()); + c->Message(Chat::White, "Unscribing spell: %s (%i) for %s.", spells[spell_id].name, spell_id, t->GetName()); Log(Logs::General, Logs::Normal, "Unscribe spell: %s (%i) request for %s from %s.", spells[spell_id].name, spell_id, t->GetName(), c->GetName()); } @@ -6642,7 +6642,7 @@ void command_wpinfo(Client *c, const Seperator *sep) Mob *t=c->GetTarget(); if (t == nullptr || !t->IsNPC()) { - c->Message(0,"You must target an NPC to use this."); + c->Message(Chat::White,"You must target an NPC to use this."); return; } @@ -6663,7 +6663,7 @@ void command_wpadd(Client *c, const Seperator *sep) if(s2info == nullptr) // Can't figure out where this mob's spawn came from... maybe a dynamic mob created by #spawn { - c->Message(0,"#wpadd FAILED -- Can't determine which spawn record in the database this mob came from!"); + c->Message(Chat::White,"#wpadd FAILED -- Can't determine which spawn record in the database this mob came from!"); return; } @@ -6673,7 +6673,7 @@ void command_wpadd(Client *c, const Seperator *sep) pause=atoi(sep->arg[1]); else { - c->Message(0,"Usage: #wpadd [pause] [-h]"); + c->Message(Chat::White,"Usage: #wpadd [pause] [-h]"); return; } } @@ -6686,10 +6686,10 @@ void command_wpadd(Client *c, const Seperator *sep) t->CastToNPC()->SetGrid(tmp_grid); t->CastToNPC()->AssignWaypoints(t->CastToNPC()->GetGrid()); - c->Message(0,"Waypoint added. Use #wpinfo to see waypoints for this NPC (may need to #repop first)."); + c->Message(Chat::White,"Waypoint added. Use #wpinfo to see waypoints for this NPC (may need to #repop first)."); } else - c->Message(0,"You must target an NPC to use this."); + c->Message(Chat::White,"You must target an NPC to use this."); } @@ -6718,14 +6718,14 @@ void command_summonitem(Client *c, const Seperator *sep) itemid = link_body.item_id; } else if (!sep->IsNumber(1)) { - c->Message(0, "Usage: #summonitem [item id | link] [charges], charges are optional"); + c->Message(Chat::White, "Usage: #summonitem [item id | link] [charges], charges are optional"); return; } else { itemid = atoi(sep->arg[1]); } if (!itemid) { - c->Message(0, "A valid item id number is required (derived: 0)"); + c->Message(Chat::White, "A valid item id number is required (derived: 0)"); return; } @@ -6810,14 +6810,14 @@ void command_givemoney(Client *c, const Seperator *sep) else { //TODO: update this to the client, otherwise the client doesn't show any weight change until you zone, move an item, etc c->GetTarget()->CastToClient()->AddMoneyToPP(atoi(sep->arg[4]), atoi(sep->arg[3]), atoi(sep->arg[2]), atoi(sep->arg[1]), true); - c->Message(0, "Added %i Platinum, %i Gold, %i Silver, and %i Copper to %s's inventory.", atoi(sep->arg[1]), atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), c->GetTarget()->GetName()); + c->Message(Chat::White, "Added %i Platinum, %i Gold, %i Silver, and %i Copper to %s's inventory.", atoi(sep->arg[1]), atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), c->GetTarget()->GetName()); } } void command_itemsearch(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) - c->Message(0, "Usage: #itemsearch [search string]"); + c->Message(Chat::White, "Usage: #itemsearch [search string]"); else { const char *search_criteria=sep->argplus[1]; @@ -6831,10 +6831,10 @@ void command_itemsearch(Client *c, const Seperator *sep) if (item) { linker.SetItemData(item); - c->Message(0, "%u: %s", item->ID, linker.GenerateLink().c_str()); + c->Message(Chat::White, "%u: %s", item->ID, linker.GenerateLink().c_str()); } else { - c->Message(0, "Item #%s not found", search_criteria); + c->Message(Chat::White, "Item #%s not found", search_criteria); } return; @@ -6854,7 +6854,7 @@ void command_itemsearch(Client *c, const Seperator *sep) if (pdest != nullptr) { linker.SetItemData(item); - c->Message(0, "%u: %s", item->ID, linker.GenerateLink().c_str()); + c->Message(Chat::White, "%u: %s", item->ID, linker.GenerateLink().c_str()); ++count; } @@ -6864,9 +6864,9 @@ void command_itemsearch(Client *c, const Seperator *sep) } if (count == 50) - c->Message(0, "50 items shown...too many results."); + c->Message(Chat::White, "50 items shown...too many results."); else - c->Message(0, "%i items found", count); + c->Message(Chat::White, "%i items found", count); } } @@ -6884,7 +6884,7 @@ void command_setaaxp(Client *c, const Seperator *sep) t->SetLeadershipEXP(atoi(sep->arg[2]), atoi(sep->arg[3])); } } else - c->Message(0, "Usage: #setaaxp ( )"); + c->Message(Chat::White, "Usage: #setaaxp ( )"); } void command_setaapts(Client *c, const Seperator *sep) @@ -6895,9 +6895,9 @@ void command_setaapts(Client *c, const Seperator *sep) t=c->GetTarget()->CastToClient(); if(sep->arg[1][0] == '\0' || sep->arg[2][0] == '\0') - c->Message(0, "Usage: #setaapts "); + c->Message(Chat::White, "Usage: #setaapts "); else if(atoi(sep->arg[2]) <= 0 || atoi(sep->arg[2]) > 5000) - c->Message(0, "You must have a number greater than 0 for points and no more than 5000."); + c->Message(Chat::White, "You must have a number greater than 0 for points and no more than 5000."); else if(!strcasecmp(sep->arg[1], "group")) { t->GetPP().group_leadership_points = atoi(sep->arg[2]); t->GetPP().group_leadership_exp = 0; @@ -6924,9 +6924,9 @@ void command_setcrystals(Client *c, const Seperator *sep) t=c->GetTarget()->CastToClient(); if(sep->arg[1][0] == '\0' || sep->arg[2][0] == '\0') - c->Message(0, "Usage: #setcrystals "); + c->Message(Chat::White, "Usage: #setcrystals "); else if(atoi(sep->arg[2]) <= 0 || atoi(sep->arg[2]) > 100000) - c->Message(0, "You must have a number greater than 0 for crystals and no more than 100000."); + c->Message(Chat::White, "You must have a number greater than 0 for crystals and no more than 100000."); else if(!strcasecmp(sep->arg[1], "radiant")) { t->SetRadiantCrystals(atoi(sep->arg[2])); @@ -6941,7 +6941,7 @@ void command_setcrystals(Client *c, const Seperator *sep) } else { - c->Message(0, "Usage: #setcrystals "); + c->Message(Chat::White, "Usage: #setcrystals "); } } @@ -6961,14 +6961,14 @@ void command_stun(Client *c, const Seperator *sep) t->CastToNPC()->Stun(duration); } else - c->Message(0, "Usage: #stun [duration]"); + c->Message(Chat::White, "Usage: #stun [duration]"); } void command_ban(Client *c, const Seperator *sep) { if(sep->arg[1][0] == 0 || sep->arg[2][0] == 0) { - c->Message(0, "Usage: #ban "); + c->Message(Chat::White, "Usage: #ban "); return; } @@ -6990,7 +6990,7 @@ if(sep->arg[1][0] == 0 || sep->arg[2][0] == 0) { } if(message.length() == 0) { - c->Message(0, "Usage: #ban "); + c->Message(Chat::White, "Usage: #ban "); return; } @@ -7028,7 +7028,7 @@ if(sep->arg[1][0] == 0 || sep->arg[2][0] == 0) { void command_suspend(Client *c, const Seperator *sep) { if((sep->arg[1][0] == 0) || (sep->arg[2][0] == 0)) { - c->Message(0, "Usage: #suspend (Specify 0 days to lift the suspension immediately) "); + c->Message(Chat::White, "Usage: #suspend (Specify 0 days to lift the suspension immediately) "); return; } @@ -7055,7 +7055,7 @@ void command_suspend(Client *c, const Seperator *sep) } if(message.length() == 0) { - c->Message(0, "Usage: #suspend (Specify 0 days to lift the suspension immediately) "); + c->Message(Chat::White, "Usage: #suspend (Specify 0 days to lift the suspension immediately) "); return; } } @@ -7103,12 +7103,12 @@ void command_ipban(Client *c, const Seperator *sep) { if(sep->arg[1] == 0) { - c->Message(0, "Usage: #ipban [xxx.xxx.xxx.xxx]"); + c->Message(Chat::White, "Usage: #ipban [xxx.xxx.xxx.xxx]"); } else { if(database.AddBannedIP(sep->arg[1], c->GetName())) { - c->Message(0, "%s has been successfully added to the Banned_IPs table by %s", sep->arg[1], c->GetName()); + c->Message(Chat::White, "%s has been successfully added to the Banned_IPs table by %s", sep->arg[1], c->GetName()); } else { - c->Message(0, "IPBan Failed (IP address is possibly already in the table?)"); + c->Message(Chat::White, "IPBan Failed (IP address is possibly already in the table?)"); } } } @@ -7116,7 +7116,7 @@ void command_ipban(Client *c, const Seperator *sep) void command_revoke(Client *c, const Seperator *sep) { if(sep->arg[1][0] == 0 || sep->arg[2][0] == 0) { - c->Message(0, "Usage: #revoke [charname] [1/0]"); + c->Message(Chat::White, "Usage: #revoke [charname] [1/0]"); return; } @@ -7134,7 +7134,7 @@ void command_revoke(Client *c, const Seperator *sep) Client* revokee = entity_list.GetClientByAccID(characterID); if(revokee) { - c->Message(0, "Found %s in this zone.", revokee->GetName()); + c->Message(Chat::White, "Found %s in this zone.", revokee->GetName()); revokee->SetRevoked(flag); return; } @@ -7153,7 +7153,7 @@ void command_revoke(Client *c, const Seperator *sep) void command_oocmute(Client *c, const Seperator *sep) { if(sep->arg[1][0] == 0 || !(sep->arg[1][0] == '1' || sep->arg[1][0] == '0')) - c->Message(0, "Usage: #oocmute [1/0]"); + c->Message(Chat::White, "Usage: #oocmute [1/0]"); else { auto outapp = new ServerPacket(ServerOP_OOCMute, 1); *(outapp->pBuffer) = atoi(sep->arg[1]); @@ -7168,13 +7168,13 @@ void command_checklos(Client *c, const Seperator *sep) { // if(c->CheckLos(c->GetTarget())) if(c->CheckLosFN(c->GetTarget())) - c->Message(0, "You have LOS to %s", c->GetTarget()->GetName()); + c->Message(Chat::White, "You have LOS to %s", c->GetTarget()->GetName()); else - c->Message(0, "You do not have LOS to %s", c->GetTarget()->GetName()); + c->Message(Chat::White, "You do not have LOS to %s", c->GetTarget()->GetName()); } else { - c->Message(0, "ERROR: Target required"); + c->Message(Chat::White, "ERROR: Target required"); } } @@ -7187,17 +7187,17 @@ void command_set_adventure_points(Client *c, const Seperator *sep) if(!sep->arg[1][0]) { - c->Message(0, "Usage: #setadventurepoints [points] [theme]"); + c->Message(Chat::White, "Usage: #setadventurepoints [points] [theme]"); return; } if(!sep->IsNumber(1) || !sep->IsNumber(2)) { - c->Message(0, "Usage: #setadventurepoints [points] [theme]"); + c->Message(Chat::White, "Usage: #setadventurepoints [points] [theme]"); return; } - c->Message(0, "Updating adventure points for %s", t->GetName()); + c->Message(Chat::White, "Updating adventure points for %s", t->GetName()); t->UpdateLDoNPoints(atoi(sep->arg[1]), atoi(sep->arg[2])); } @@ -7209,7 +7209,7 @@ void command_npcsay(Client *c, const Seperator *sep) } else { - c->Message(0, "Usage: #npcsay message (requires NPC target"); + c->Message(Chat::White, "Usage: #npcsay message (requires NPC target"); } } @@ -7221,13 +7221,13 @@ void command_npcshout(Client *c, const Seperator *sep) } else { - c->Message(0, "Usage: #npcshout message (requires NPC target"); + c->Message(Chat::White, "Usage: #npcshout message (requires NPC target"); } } void command_timers(Client *c, const Seperator *sep) { if(!c->GetTarget() || !c->GetTarget()->IsClient()) { - c->Message(0,"Need a player target for timers."); + c->Message(Chat::White,"Need a player target for timers."); return; } Client *them = c->GetTarget()->CastToClient(); @@ -7235,12 +7235,12 @@ void command_timers(Client *c, const Seperator *sep) { std::vector< std::pair > res; them->GetPTimers().ToVector(res); - c->Message(0,"Timers for target:"); + c->Message(Chat::White,"Timers for target:"); int r; int l = res.size(); for(r = 0; r < l; r++) { - c->Message(0,"Timer %d: %d seconds remain.", res[r].first, res[r].second->GetRemainingTime()); + c->Message(Chat::White,"Timer %d: %d seconds remain.", res[r].first, res[r].second->GetRemainingTime()); } } @@ -7252,7 +7252,7 @@ void command_npcemote(Client *c, const Seperator *sep) } else { - c->Message(0, "Usage: #npcemote message (requires NPC target"); + c->Message(Chat::White, "Usage: #npcemote message (requires NPC target"); } } @@ -7367,93 +7367,93 @@ void command_npceditmass(Client *c, const Seperator *sep) void command_npcedit(Client *c, const Seperator *sep) { if (!c->GetTarget() || !c->GetTarget()->IsNPC()) { - c->Message(0, "Error: Must have NPC targeted"); + c->Message(Chat::White, "Error: Must have NPC targeted"); return; } if (strcasecmp(sep->arg[1], "help") == 0) { - c->Message(0, "Help File for #npcedit. Syntax for commands are:"); - c->Message(0, "#npcedit Name - Sets an NPC's name"); - c->Message(0, "#npcedit Lastname - Sets an NPC's lastname"); - c->Message(0, "#npcedit Level - Sets an NPC's level"); - c->Message(0, "#npcedit Maxlevel - Sets an NPC's maximum level"); - c->Message(0, "#npcedit Race - Sets an NPC's race"); - c->Message(0, "#npcedit Class - Sets an NPC's class"); - c->Message(0, "#npcedit Bodytype - Sets an NPC's bodytype"); - c->Message(0, "#npcedit HP - Sets an NPC's hitpoints"); - c->Message(0, "#npcedit Gender - Sets an NPC's gender"); - c->Message(0, "#npcedit Texture - Sets an NPC's texture"); - c->Message(0, "#npcedit Helmtexture - Sets an NPC's helmet texture"); - c->Message(0, "#npcedit Armtexture - Sets an NPC's arm texture"); - c->Message(0, "#npcedit Bracertexture - Sets an NPC's bracer texture"); - c->Message(0, "#npcedit Handtexture - Sets an NPC's hand texture"); - c->Message(0, "#npcedit Legtexture - Sets an NPC's leg texture"); - c->Message(0, "#npcedit Feettexture - Sets an NPC's feettexture"); - c->Message(0, "#npcedit Herosforgemodel - Sets an NPC's Hero's Forge Model"); - c->Message(0, "#npcedit Size - Sets an NPC's size"); - c->Message(0, "#npcedit Hpregen - Sets an NPC's hitpoint regen rate per tick"); - c->Message(0, "#npcedit Manaregen - Sets an NPC's mana regen rate per tick"); - c->Message(0, "#npcedit Loottable - Sets the loottable ID for an NPC "); - c->Message(0, "#npcedit Merchantid - Sets the merchant ID for an NPC"); - c->Message(0, "#npcedit alt_currency_id - Sets the Alternate Currency ID for an alterative currency Merchant"); - c->Message(0, "#npcedit npc_spells_effects_id - Sets the NPC Spell Effects ID"); - c->Message(0, "#npcedit adventure_template_id - Sets the NPC's Adventure Template ID"); - c->Message(0, "#npcedit trap_template - Sets the NPC's Trap Template ID"); - c->Message(0, "#npcedit special_abilities - Sets the NPC's Special Abilities"); - c->Message(0, "#npcedit Spell - Sets the npc spells list ID for an NPC"); - c->Message(0, "#npcedit Faction - Sets the NPC's faction id"); - c->Message(0, "#npcedit Damage - Sets an NPC's damage"); - c->Message(0, "#npcedit Meleetype - Sets an NPC's melee types"); - c->Message(0, "#npcedit Rangedtype - Sets an NPC's ranged type"); - c->Message(0, "#npcedit Ammoidfile - Sets an NPC's ammo id file"); - c->Message(0, "#npcedit Aggroradius - Sets an NPC's aggro radius"); - c->Message(0, "#npcedit Assistradius - Sets an NPC's assist radius"); - c->Message(0, "#npcedit Social - Set to 1 if an NPC should assist others on its faction"); - c->Message(0, "#npcedit Runspeed - Sets an NPC's run speed"); - c->Message(0, "#npcedit Walkspeed - Sets an NPC's walk speed"); - c->Message(0, "#npcedit AGI - Sets an NPC's Agility"); - c->Message(0, "#npcedit CHA - Sets an NPC's Charisma"); - c->Message(0, "#npcedit DEX - Sets an NPC's Dexterity"); - c->Message(0, "#npcedit INT - Sets an NPC's Intelligence"); - c->Message(0, "#npcedit STA - Sets an NPC's Stamina"); - c->Message(0, "#npcedit STR - Sets an NPC's Strength"); - c->Message(0, "#npcedit WIS - Sets an NPC's Wisdom"); - c->Message(0, "#npcedit MR - Sets an NPC's Magic Resistance"); - c->Message(0, "#npcedit PR - Sets an NPC's Poison Resistance"); - c->Message(0, "#npcedit DR - Sets an NPC's Disease Resistance"); - c->Message(0, "#npcedit FR - Sets an NPC's Fire Resistance"); - c->Message(0, "#npcedit CR - Sets an NPC's Cold Resistance"); - c->Message(0, "#npcedit Corrup - Sets an NPC's Corruption Resistance"); - c->Message(0, "#npcedit PhR - Sets and NPC's Physical Resistance"); - c->Message(0, "#npcedit Seeinvis - Sets an NPC's ability to see invis"); - c->Message(0, "#npcedit Seeinvisundead - Sets an NPC's ability to see through invis vs. undead"); - c->Message(0, "#npcedit Seehide - Sets an NPC's ability to see through hide"); - c->Message(0, "#npcedit Seeimprovedhide - Sets an NPC's ability to see through improved hide"); - c->Message(0, "#npcedit AC - Sets an NPC's Armor Class"); - c->Message(0, "#npcedit ATK - Sets an NPC's Attack"); - c->Message(0, "#npcedit Accuracy - Sets an NPC's Accuracy"); - c->Message(0, "#npcedit Avoidance - Sets an NPC's Avoidance"); - c->Message(0, "#npcedit npcaggro - Sets an NPC's npc_aggro flag"); - c->Message(0, "#npcedit qglobal - Sets an NPC's quest global flag"); - c->Message(0, "#npcedit spawn_limit - Sets an NPC's spawn limit counter"); - c->Message(0, "#npcedit Attackspeed - Sets an NPC's attack speed modifier"); - c->Message(0, "#npcedit Attackdelay - Sets an NPC's attack delay"); - c->Message(0, "#npcedit Attackcount - Sets an NPC's attack count"); - c->Message(0, "#npcedit findable - Sets an NPC's findable flag"); - c->Message(0, "#npcedit trackable - Sets an NPC's trackable flag"); - c->Message(0, "#npcedit weapon - Sets an NPC's primary and secondary weapon model"); - c->Message(0, "#npcedit featuresave - Saves all current facial features to the database"); - c->Message(0, "#npcedit color - Sets an NPC's red, green, and blue armor tint"); - c->Message(0, "#npcedit armortint_id - Set an NPC's Armor tint ID"); - c->Message(0, "#npcedit setanimation - Set an NPC's animation on spawn (Stored in spawn2 table)"); - c->Message(0, "#npcedit scalerate - Set an NPC's scaling rate"); - c->Message(0, "#npcedit healscale - Set an NPC's heal scaling rate"); - c->Message(0, "#npcedit spellscale - Set an NPC's spell scaling rate"); - c->Message(0, "#npcedit no_target - Set an NPC's ability to be targeted with the target hotkey"); - c->Message(0, "#npcedit version - Set an NPC's version"); - c->Message(0, "#npcedit slow_mitigation - Set an NPC's slow mitigation"); - c->Message(0, "#npcedit flymode - Set an NPC's flymode [0 = ground, 1 = flying, 2 = levitate, 3 = water, 4 = floating]"); + c->Message(Chat::White, "Help File for #npcedit. Syntax for commands are:"); + c->Message(Chat::White, "#npcedit Name - Sets an NPC's name"); + c->Message(Chat::White, "#npcedit Lastname - Sets an NPC's lastname"); + c->Message(Chat::White, "#npcedit Level - Sets an NPC's level"); + c->Message(Chat::White, "#npcedit Maxlevel - Sets an NPC's maximum level"); + c->Message(Chat::White, "#npcedit Race - Sets an NPC's race"); + c->Message(Chat::White, "#npcedit Class - Sets an NPC's class"); + c->Message(Chat::White, "#npcedit Bodytype - Sets an NPC's bodytype"); + c->Message(Chat::White, "#npcedit HP - Sets an NPC's hitpoints"); + c->Message(Chat::White, "#npcedit Gender - Sets an NPC's gender"); + c->Message(Chat::White, "#npcedit Texture - Sets an NPC's texture"); + c->Message(Chat::White, "#npcedit Helmtexture - Sets an NPC's helmet texture"); + c->Message(Chat::White, "#npcedit Armtexture - Sets an NPC's arm texture"); + c->Message(Chat::White, "#npcedit Bracertexture - Sets an NPC's bracer texture"); + c->Message(Chat::White, "#npcedit Handtexture - Sets an NPC's hand texture"); + c->Message(Chat::White, "#npcedit Legtexture - Sets an NPC's leg texture"); + c->Message(Chat::White, "#npcedit Feettexture - Sets an NPC's feettexture"); + c->Message(Chat::White, "#npcedit Herosforgemodel - Sets an NPC's Hero's Forge Model"); + c->Message(Chat::White, "#npcedit Size - Sets an NPC's size"); + c->Message(Chat::White, "#npcedit Hpregen - Sets an NPC's hitpoint regen rate per tick"); + c->Message(Chat::White, "#npcedit Manaregen - Sets an NPC's mana regen rate per tick"); + c->Message(Chat::White, "#npcedit Loottable - Sets the loottable ID for an NPC "); + c->Message(Chat::White, "#npcedit Merchantid - Sets the merchant ID for an NPC"); + c->Message(Chat::White, "#npcedit alt_currency_id - Sets the Alternate Currency ID for an alterative currency Merchant"); + c->Message(Chat::White, "#npcedit npc_spells_effects_id - Sets the NPC Spell Effects ID"); + c->Message(Chat::White, "#npcedit adventure_template_id - Sets the NPC's Adventure Template ID"); + c->Message(Chat::White, "#npcedit trap_template - Sets the NPC's Trap Template ID"); + c->Message(Chat::White, "#npcedit special_abilities - Sets the NPC's Special Abilities"); + c->Message(Chat::White, "#npcedit Spell - Sets the npc spells list ID for an NPC"); + c->Message(Chat::White, "#npcedit Faction - Sets the NPC's faction id"); + c->Message(Chat::White, "#npcedit Damage - Sets an NPC's damage"); + c->Message(Chat::White, "#npcedit Meleetype - Sets an NPC's melee types"); + c->Message(Chat::White, "#npcedit Rangedtype - Sets an NPC's ranged type"); + c->Message(Chat::White, "#npcedit Ammoidfile - Sets an NPC's ammo id file"); + c->Message(Chat::White, "#npcedit Aggroradius - Sets an NPC's aggro radius"); + c->Message(Chat::White, "#npcedit Assistradius - Sets an NPC's assist radius"); + c->Message(Chat::White, "#npcedit Social - Set to 1 if an NPC should assist others on its faction"); + c->Message(Chat::White, "#npcedit Runspeed - Sets an NPC's run speed"); + c->Message(Chat::White, "#npcedit Walkspeed - Sets an NPC's walk speed"); + c->Message(Chat::White, "#npcedit AGI - Sets an NPC's Agility"); + c->Message(Chat::White, "#npcedit CHA - Sets an NPC's Charisma"); + c->Message(Chat::White, "#npcedit DEX - Sets an NPC's Dexterity"); + c->Message(Chat::White, "#npcedit INT - Sets an NPC's Intelligence"); + c->Message(Chat::White, "#npcedit STA - Sets an NPC's Stamina"); + c->Message(Chat::White, "#npcedit STR - Sets an NPC's Strength"); + c->Message(Chat::White, "#npcedit WIS - Sets an NPC's Wisdom"); + c->Message(Chat::White, "#npcedit MR - Sets an NPC's Magic Resistance"); + c->Message(Chat::White, "#npcedit PR - Sets an NPC's Poison Resistance"); + c->Message(Chat::White, "#npcedit DR - Sets an NPC's Disease Resistance"); + c->Message(Chat::White, "#npcedit FR - Sets an NPC's Fire Resistance"); + c->Message(Chat::White, "#npcedit CR - Sets an NPC's Cold Resistance"); + c->Message(Chat::White, "#npcedit Corrup - Sets an NPC's Corruption Resistance"); + c->Message(Chat::White, "#npcedit PhR - Sets and NPC's Physical Resistance"); + c->Message(Chat::White, "#npcedit Seeinvis - Sets an NPC's ability to see invis"); + c->Message(Chat::White, "#npcedit Seeinvisundead - Sets an NPC's ability to see through invis vs. undead"); + c->Message(Chat::White, "#npcedit Seehide - Sets an NPC's ability to see through hide"); + c->Message(Chat::White, "#npcedit Seeimprovedhide - Sets an NPC's ability to see through improved hide"); + c->Message(Chat::White, "#npcedit AC - Sets an NPC's Armor Class"); + c->Message(Chat::White, "#npcedit ATK - Sets an NPC's Attack"); + c->Message(Chat::White, "#npcedit Accuracy - Sets an NPC's Accuracy"); + c->Message(Chat::White, "#npcedit Avoidance - Sets an NPC's Avoidance"); + c->Message(Chat::White, "#npcedit npcaggro - Sets an NPC's npc_aggro flag"); + c->Message(Chat::White, "#npcedit qglobal - Sets an NPC's quest global flag"); + c->Message(Chat::White, "#npcedit spawn_limit - Sets an NPC's spawn limit counter"); + c->Message(Chat::White, "#npcedit Attackspeed - Sets an NPC's attack speed modifier"); + c->Message(Chat::White, "#npcedit Attackdelay - Sets an NPC's attack delay"); + c->Message(Chat::White, "#npcedit Attackcount - Sets an NPC's attack count"); + c->Message(Chat::White, "#npcedit findable - Sets an NPC's findable flag"); + c->Message(Chat::White, "#npcedit trackable - Sets an NPC's trackable flag"); + c->Message(Chat::White, "#npcedit weapon - Sets an NPC's primary and secondary weapon model"); + c->Message(Chat::White, "#npcedit featuresave - Saves all current facial features to the database"); + c->Message(Chat::White, "#npcedit color - Sets an NPC's red, green, and blue armor tint"); + c->Message(Chat::White, "#npcedit armortint_id - Set an NPC's Armor tint ID"); + c->Message(Chat::White, "#npcedit setanimation - Set an NPC's animation on spawn (Stored in spawn2 table)"); + c->Message(Chat::White, "#npcedit scalerate - Set an NPC's scaling rate"); + c->Message(Chat::White, "#npcedit healscale - Set an NPC's heal scaling rate"); + c->Message(Chat::White, "#npcedit spellscale - Set an NPC's spell scaling rate"); + c->Message(Chat::White, "#npcedit no_target - Set an NPC's ability to be targeted with the target hotkey"); + c->Message(Chat::White, "#npcedit version - Set an NPC's version"); + c->Message(Chat::White, "#npcedit slow_mitigation - Set an NPC's slow mitigation"); + c->Message(Chat::White, "#npcedit flymode - Set an NPC's flymode [0 = ground, 1 = flying, 2 = levitate, 3 = water, 4 = floating]"); } @@ -7994,9 +7994,9 @@ void command_npcedit(Client *c, const Seperator *sep) if((strcasecmp(sep->arg[2], "loot" ) == 0) || atoi(sep->arg[2]) == 4) animation = 4; //Looting Animation } else { - c->Message(0, "You must specifiy an animation stand, sit, crouch, dead, loot (0-4)"); - c->Message(0, "Example: #npcedit setanimation sit"); - c->Message(0, "Example: #npcedit setanimation 0"); + c->Message(Chat::White, "You must specifiy an animation stand, sit, crouch, dead, loot (0-4)"); + c->Message(Chat::White, "Example: #npcedit setanimation sit"); + c->Message(Chat::White, "Example: #npcedit setanimation 0"); return; } @@ -8051,7 +8051,7 @@ void command_npcedit(Client *c, const Seperator *sep) } if((sep->arg[1][0] == 0 || strcasecmp(sep->arg[1],"*")==0) || ((c->GetTarget()==0) || (c->GetTarget()->IsClient()))) - c->Message(0, "Type #npcedit help for more info"); + c->Message(Chat::White, "Type #npcedit help for more info"); } @@ -8078,14 +8078,14 @@ void command_profilereset(Client *c, const Seperator *sep) { void command_opcode(Client *c, const Seperator *sep) { if(!strcasecmp(sep->arg[1], "reload" )) { ReloadAllPatches(); - c->Message(0, "Opcodes for all patches have been reloaded"); + c->Message(Chat::White, "Opcodes for all patches have been reloaded"); } } void command_qglobal(Client *c, const Seperator *sep) { //In-game switch for qglobal column if(sep->arg[1][0] == 0) { - c->Message(0, "Syntax: #qglobal [on/off/view]. Requires NPC target."); + c->Message(Chat::White, "Syntax: #qglobal [on/off/view]. Requires NPC target."); return; } @@ -8168,7 +8168,7 @@ void command_undye(Client *c, const Seperator *sep) } else { - c->Message(0, "ERROR: Client target required"); + c->Message(Chat::White, "ERROR: Client target required"); } } @@ -8275,23 +8275,23 @@ void command_ginfo(Client *c, const Seperator *sep) Group *g = t->GetGroup(); if(!g) { - c->Message(0, "This client is not in a group"); + c->Message(Chat::White, "This client is not in a group"); return; } - c->Message(0, "Player: %s is in Group #%lu: with %i members", t->GetName(), (unsigned long)g->GetID(), g->GroupCount()); + c->Message(Chat::White, "Player: %s is in Group #%lu: with %i members", t->GetName(), (unsigned long)g->GetID(), g->GroupCount()); uint32 r; for(r = 0; r < MAX_GROUP_MEMBERS; r++) { if(g->members[r] == nullptr) { if(g->membername[r][0] == '\0') continue; - c->Message(0, "...Zoned Member: %s, Roles: %s %s %s", g->membername[r], + c->Message(Chat::White, "...Zoned Member: %s, Roles: %s %s %s", g->membername[r], (g->MemberRoles[r] & RoleAssist) ? "Assist" : "", (g->MemberRoles[r] & RoleTank) ? "Tank" : "", (g->MemberRoles[r] & RolePuller) ? "Puller" : ""); } else { - c->Message(0, "...In-Zone Member: %s (0x%x) Roles: %s %s %s", g->membername[r], g->members[r], + c->Message(Chat::White, "...In-Zone Member: %s (0x%x) Roles: %s %s %s", g->membername[r], g->members[r], (g->MemberRoles[r] & RoleAssist) ? "Assist" : "", (g->MemberRoles[r] & RoleTank) ? "Tank" : "", (g->MemberRoles[r] & RolePuller) ? "Puller" : ""); @@ -8309,7 +8309,7 @@ void command_hp(Client *c, const Seperator *sep) void command_aggro(Client *c, const Seperator *sep) { if(c->GetTarget() == nullptr || !c->GetTarget()->IsNPC()) { - c->Message(0, "Error: you must have an NPC target."); + c->Message(Chat::White, "Error: you must have an NPC target."); return; } float d = atof(sep->arg[1]); @@ -8330,18 +8330,18 @@ void command_pf(Client *c, const Seperator *sep) if(c->GetTarget()) { Mob *who = c->GetTarget(); - c->Message(0, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ()); - c->Message(0, "WP: %s (%d/%d)", to_string(who->GetCurrentWayPoint()).c_str(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1); - c->Message(0, "pause=%d RAspeed=%d", who->GetCWPP(), who->GetRunAnimSpeed()); + c->Message(Chat::White, "POS: (%.2f, %.2f, %.2f)", who->GetX(), who->GetY(), who->GetZ()); + c->Message(Chat::White, "WP: %s (%d/%d)", to_string(who->GetCurrentWayPoint()).c_str(), who->IsNPC()?who->CastToNPC()->GetMaxWp():-1); + c->Message(Chat::White, "pause=%d RAspeed=%d", who->GetCWPP(), who->GetRunAnimSpeed()); //who->DumpMovement(c); } else { - c->Message(0, "ERROR: target required"); + c->Message(Chat::White, "ERROR: target required"); } } void command_bestz(Client *c, const Seperator *sep) { if (zone->zonemap == nullptr) { - c->Message(0,"Map not loaded for this zone"); + c->Message(Chat::White,"Map not loaded for this zone"); } else { glm::vec3 me; me.x = c->GetX(); @@ -8355,16 +8355,16 @@ void command_bestz(Client *c, const Seperator *sep) { if (best_z != BEST_Z_INVALID) { - c->Message(0, "Z is %.3f at (%.3f, %.3f).", best_z, me.x, me.y); + c->Message(Chat::White, "Z is %.3f at (%.3f, %.3f).", best_z, me.x, me.y); } else { - c->Message(0, "Found no Z."); + c->Message(Chat::White, "Found no Z."); } } if(zone->watermap == nullptr) { - c->Message(0,"Water Region Map not loaded for this zone"); + c->Message(Chat::White,"Water Region Map not loaded for this zone"); } else { WaterRegionType RegionType; float z; @@ -8373,28 +8373,28 @@ void command_bestz(Client *c, const Seperator *sep) { z=c->GetTarget()->GetZ(); auto position = glm::vec3(c->GetTarget()->GetX(), c->GetTarget()->GetY(), z); RegionType = zone->watermap->ReturnRegionType(position); - c->Message(0,"InWater returns %d", zone->watermap->InWater(position)); - c->Message(0,"InLava returns %d", zone->watermap->InLava(position)); + c->Message(Chat::White,"InWater returns %d", zone->watermap->InWater(position)); + c->Message(Chat::White,"InLava returns %d", zone->watermap->InLava(position)); } else { z=c->GetZ(); auto position = glm::vec3(c->GetX(), c->GetY(), z); RegionType = zone->watermap->ReturnRegionType(position); - c->Message(0,"InWater returns %d", zone->watermap->InWater(position)); - c->Message(0,"InLava returns %d", zone->watermap->InLava(position)); + c->Message(Chat::White,"InWater returns %d", zone->watermap->InWater(position)); + c->Message(Chat::White,"InLava returns %d", zone->watermap->InLava(position)); } switch(RegionType) { - case RegionTypeNormal: { c->Message(0,"There is nothing special about the region you are in!"); break; } - case RegionTypeWater: { c->Message(0,"You/your target are in Water."); break; } - case RegionTypeLava: { c->Message(0,"You/your target are in Lava."); break; } - case RegionTypeVWater: { c->Message(0,"You/your target are in VWater (Icy Water?)."); break; } - case RegionTypePVP: { c->Message(0, "You/your target are in a pvp enabled area."); break; } - case RegionTypeSlime: { c->Message(0, "You/your target are in slime."); break; } - case RegionTypeIce: { c->Message(0, "You/your target are in ice."); break; } - default: c->Message(0,"You/your target are in an unknown region type."); + case RegionTypeNormal: { c->Message(Chat::White,"There is nothing special about the region you are in!"); break; } + case RegionTypeWater: { c->Message(Chat::White,"You/your target are in Water."); break; } + case RegionTypeLava: { c->Message(Chat::White,"You/your target are in Lava."); break; } + case RegionTypeVWater: { c->Message(Chat::White,"You/your target are in VWater (Icy Water?)."); break; } + case RegionTypePVP: { c->Message(Chat::White, "You/your target are in a pvp enabled area."); break; } + case RegionTypeSlime: { c->Message(Chat::White, "You/your target are in slime."); break; } + case RegionTypeIce: { c->Message(Chat::White, "You/your target are in ice."); break; } + default: c->Message(Chat::White,"You/your target are in an unknown region type."); } } @@ -8403,7 +8403,7 @@ void command_bestz(Client *c, const Seperator *sep) { void command_reloadstatic(Client *c, const Seperator *sep) { - c->Message(0, "Reloading zone static data..."); + c->Message(Chat::White, "Reloading zone static data..."); zone->ReloadStaticData(); } @@ -8422,13 +8422,13 @@ void command_flags(Client *c, const Seperator *sep) { void command_flagedit(Client *c, const Seperator *sep) { //super-command for editing zone flags if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) { - c->Message(0, "Syntax: #flagedit [lockzone|unlockzone|listzones|give|take]."); - c->Message(0, "...lockzone [zone id/short] [flag name] - Set the specified flag name on the zone, locking the zone"); - c->Message(0, "...unlockzone [zone id/short] - Removes the flag requirement from the specified zone"); - c->Message(0, "...listzones - List all zones which require a flag, and their flag's name"); - c->Message(0, "...give [zone id/short] - Give your target the zone flag for the specified zone."); - c->Message(0, "...take [zone id/short] - Take the zone flag for the specified zone away from your target"); - c->Message(0, "...Note: use #flags to view flags on a person"); + c->Message(Chat::White, "Syntax: #flagedit [lockzone|unlockzone|listzones|give|take]."); + c->Message(Chat::White, "...lockzone [zone id/short] [flag name] - Set the specified flag name on the zone, locking the zone"); + c->Message(Chat::White, "...unlockzone [zone id/short] - Removes the flag requirement from the specified zone"); + c->Message(Chat::White, "...listzones - List all zones which require a flag, and their flag's name"); + c->Message(Chat::White, "...give [zone id/short] - Give your target the zone flag for the specified zone."); + c->Message(Chat::White, "...take [zone id/short] - Take the zone flag for the specified zone away from your target"); + c->Message(Chat::White, "...Note: use #flags to view flags on a person"); return; } @@ -8501,9 +8501,9 @@ void command_flagedit(Client *c, const Seperator *sep) { return; } - c->Message(0, "Zones which require flags:"); + c->Message(Chat::White, "Zones which require flags:"); for (auto row = results.begin(); row != results.end(); ++row) - c->Message(0, "Zone %s (%s,%s) version %s requires key %s", row[2], row[0], row[1], row[3], row[4]); + c->Message(Chat::White, "Zone %s (%s,%s) version %s requires key %s", row[2], row[0], row[1], row[3], row[4]); return; } @@ -8568,7 +8568,7 @@ void command_acceptrules(Client *c, const Seperator *sep) { database.SetAgreementFlag(c->AccountID()); c->SendAppearancePacket(AT_Anim, ANIM_STAND); - c->Message(0,"It is recorded you have agreed to the rules."); + c->Message(Chat::White,"It is recorded you have agreed to the rules."); } } @@ -8580,7 +8580,7 @@ void command_guildcreate(Client *c, const Seperator *sep) } else { - c->Message(0,"Guild name must be more than 4 characters and less than 16."); + c->Message(Chat::White,"Guild name must be more than 4 characters and less than 16."); } } @@ -8597,17 +8597,17 @@ void command_guildlist(Client *c, const Seperator *sep) tmp->ApprovedMembers(c); } else - c->Message(0,"Could not find reference id."); + c->Message(Chat::White,"Could not find reference id."); } void command_hatelist(Client *c, const Seperator *sep) { Mob *target = c->GetTarget(); if(target == nullptr) { - c->Message(0, "Error: you must have a target."); + c->Message(Chat::White, "Error: you must have a target."); return; } - c->Message(0, "Display hate list for %s..", target->GetName()); + c->Message(Chat::White, "Display hate list for %s..", target->GetName()); target->PrintHateListToClient(c); } @@ -8615,29 +8615,29 @@ void command_hatelist(Client *c, const Seperator *sep) { void command_rules(Client *c, const Seperator *sep) { //super-command for managing rules settings if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) { - c->Message(0, "Syntax: #rules [subcommand]."); - c->Message(0, "-- Rule Set Manipulation --"); - c->Message(0, "...listsets - List avaliable rule sets"); - c->Message(0, "...current - gives the name of the ruleset currently running in this zone"); - c->Message(0, "...reload - Reload the selected ruleset in this zone"); - c->Message(0, "...switch (ruleset name) - Change the selected ruleset and load it"); - c->Message(0, "...load (ruleset name) - Load a ruleset in just this zone without changing the selected set"); + c->Message(Chat::White, "Syntax: #rules [subcommand]."); + c->Message(Chat::White, "-- Rule Set Manipulation --"); + c->Message(Chat::White, "...listsets - List avaliable rule sets"); + c->Message(Chat::White, "...current - gives the name of the ruleset currently running in this zone"); + c->Message(Chat::White, "...reload - Reload the selected ruleset in this zone"); + c->Message(Chat::White, "...switch (ruleset name) - Change the selected ruleset and load it"); + c->Message(Chat::White, "...load (ruleset name) - Load a ruleset in just this zone without changing the selected set"); //too lazy to write this right now: -// c->Message(0, "...wload (ruleset name) - Load a ruleset in all zones without changing the selected set"); - c->Message(0, "...store [ruleset name] - Store the running ruleset as the specified name"); - c->Message(0, "---------------------"); - c->Message(0, "-- Running Rule Manipulation --"); - c->Message(0, "...reset - Reset all rules to their default values"); - c->Message(0, "...get [rule] - Get the specified rule's local value"); - c->Message(0, "...set (rule) (value) - Set the specified rule to the specified value locally only"); - c->Message(0, "...setdb (rule) (value) - Set the specified rule to the specified value locally and in the DB"); - c->Message(0, "...list [catname] - List all rules in the specified category (or all categiries if omitted)"); - c->Message(0, "...values [catname] - List the value of all rules in the specified category"); +// c->Message(Chat::White, "...wload (ruleset name) - Load a ruleset in all zones without changing the selected set"); + c->Message(Chat::White, "...store [ruleset name] - Store the running ruleset as the specified name"); + c->Message(Chat::White, "---------------------"); + c->Message(Chat::White, "-- Running Rule Manipulation --"); + c->Message(Chat::White, "...reset - Reset all rules to their default values"); + c->Message(Chat::White, "...get [rule] - Get the specified rule's local value"); + c->Message(Chat::White, "...set (rule) (value) - Set the specified rule to the specified value locally only"); + c->Message(Chat::White, "...setdb (rule) (value) - Set the specified rule to the specified value locally and in the DB"); + c->Message(Chat::White, "...list [catname] - List all rules in the specified category (or all categiries if omitted)"); + c->Message(Chat::White, "...values [catname] - List the value of all rules in the specified category"); return; } if(!strcasecmp(sep->arg[1], "current")) { - c->Message(0, "Currently running ruleset '%s' (%d)", RuleManager::Instance()->GetActiveRuleset(), + c->Message(Chat::White, "Currently running ruleset '%s' (%d)", RuleManager::Instance()->GetActiveRuleset(), RuleManager::Instance()->GetActiveRulesetID()); } else if(!strcasecmp(sep->arg[1], "listsets")) { std::map sets; @@ -8646,16 +8646,16 @@ void command_rules(Client *c, const Seperator *sep) { return; } - c->Message(0, "Avaliable rule sets:"); + c->Message(Chat::White, "Avaliable rule sets:"); std::map::iterator cur, end; cur = sets.begin(); end = sets.end(); for(; cur != end; ++cur) { - c->Message(0, "(%d) %s", cur->first, cur->second.c_str()); + c->Message(Chat::White, "(%d) %s", cur->first, cur->second.c_str()); } } else if(!strcasecmp(sep->arg[1], "reload")) { RuleManager::Instance()->LoadRules(&database, RuleManager::Instance()->GetActiveRuleset(), true); - c->Message(0, "The active ruleset (%s (%d)) has been reloaded", RuleManager::Instance()->GetActiveRuleset(), + c->Message(Chat::White, "The active ruleset (%s (%d)) has been reloaded", RuleManager::Instance()->GetActiveRuleset(), RuleManager::Instance()->GetActiveRulesetID()); } else if(!strcasecmp(sep->arg[1], "switch")) { //make sure this is a valid rule set.. @@ -8672,7 +8672,7 @@ void command_rules(Client *c, const Seperator *sep) { //TODO: we likely want to reload this ruleset everywhere... RuleManager::Instance()->LoadRules(&database, sep->arg[2], true); - c->Message(0, "The selected ruleset has been changed to (%s (%d)) and reloaded locally", sep->arg[2], rsid); + c->Message(Chat::White, "The selected ruleset has been changed to (%s (%d)) and reloaded locally", sep->arg[2], rsid); } else if(!strcasecmp(sep->arg[1], "load")) { //make sure this is a valid rule set.. int rsid = RuleManager::Instance()->GetRulesetID(&database, sep->arg[2]); @@ -8681,12 +8681,12 @@ void command_rules(Client *c, const Seperator *sep) { return; } RuleManager::Instance()->LoadRules(&database, sep->arg[2], true); - c->Message(0, "Loaded ruleset '%s' (%d) locally", sep->arg[2], rsid); + c->Message(Chat::White, "Loaded ruleset '%s' (%d) locally", sep->arg[2], rsid); } else if(!strcasecmp(sep->arg[1], "store")) { if(sep->argnum == 1) { //store current rule set. RuleManager::Instance()->SaveRules(&database); - c->Message(0, "Rules saved"); + c->Message(Chat::White, "Rules saved"); } else if(sep->argnum == 2) { RuleManager::Instance()->SaveRules(&database, sep->arg[2]); int prersid = RuleManager::Instance()->GetActiveRulesetID(); @@ -8694,9 +8694,9 @@ void command_rules(Client *c, const Seperator *sep) { if(rsid < 0) { c->Message(Chat::Red, "Unable to query ruleset ID after store, it most likely failed."); } else { - c->Message(0, "Stored rules as ruleset '%s' (%d)", sep->arg[2], rsid); + c->Message(Chat::White, "Stored rules as ruleset '%s' (%d)", sep->arg[2], rsid); if(prersid != rsid) { - c->Message(0, "Rule set %s (%d) is now active in this zone", sep->arg[2], rsid); + c->Message(Chat::White, "Rule set %s (%d) is now active in this zone", sep->arg[2], rsid); } } } else { @@ -8705,7 +8705,7 @@ void command_rules(Client *c, const Seperator *sep) { } } else if(!strcasecmp(sep->arg[1], "reset")) { RuleManager::Instance()->ResetRules(true); - c->Message(0, "The running ruleset has been set to defaults"); + c->Message(Chat::White, "The running ruleset has been set to defaults"); } else if(!strcasecmp(sep->arg[1], "get")) { if(sep->argnum != 2) { @@ -8716,7 +8716,7 @@ void command_rules(Client *c, const Seperator *sep) { if(!RuleManager::Instance()->GetRule(sep->arg[2], value)) c->Message(Chat::Red, "Unable to find rule %s", sep->arg[2]); else - c->Message(0, "%s - %s", sep->arg[2], value.c_str()); + c->Message(Chat::White, "%s - %s", sep->arg[2], value.c_str()); } else if(!strcasecmp(sep->arg[1], "set")) { if(sep->argnum != 3) { @@ -8726,7 +8726,7 @@ void command_rules(Client *c, const Seperator *sep) { if(!RuleManager::Instance()->SetRule(sep->arg[2], sep->arg[3], nullptr, false, true)) { c->Message(Chat::Red, "Failed to modify rule"); } else { - c->Message(0, "Rule modified locally."); + c->Message(Chat::White, "Rule modified locally."); } } else if(!strcasecmp(sep->arg[1], "setdb")) { if(sep->argnum != 3) { @@ -8736,7 +8736,7 @@ void command_rules(Client *c, const Seperator *sep) { if(!RuleManager::Instance()->SetRule(sep->arg[2], sep->arg[3], &database, true, true)) { c->Message(Chat::Red, "Failed to modify rule"); } else { - c->Message(0, "Rule modified locally and in the database."); + c->Message(Chat::White, "Rule modified locally and in the database."); } } else if(!strcasecmp(sep->arg[1], "list")) { if(sep->argnum == 1) { @@ -8745,12 +8745,12 @@ void command_rules(Client *c, const Seperator *sep) { c->Message(Chat::Red, "Failed to list categories!"); return; } - c->Message(0, "Rule Categories:"); + c->Message(Chat::White, "Rule Categories:"); std::vector::iterator cur, end; cur = rule_list.begin(); end = rule_list.end(); for(; cur != end; ++cur) { - c->Message(0, " %s", *cur); + c->Message(Chat::White, " %s", *cur); } } else if(sep->argnum == 2) { const char *catfilt = nullptr; @@ -8761,12 +8761,12 @@ void command_rules(Client *c, const Seperator *sep) { c->Message(Chat::Red, "Failed to list rules!"); return; } - c->Message(0, "Rules in category %s:", sep->arg[2]); + c->Message(Chat::White, "Rules in category %s:", sep->arg[2]); std::vector::iterator cur, end; cur = rule_list.begin(); end = rule_list.end(); for(; cur != end; ++cur) { - c->Message(0, " %s", *cur); + c->Message(Chat::White, " %s", *cur); } } else { c->Message(Chat::Red, "Invalid argument count, see help."); @@ -8784,13 +8784,13 @@ void command_rules(Client *c, const Seperator *sep) { c->Message(Chat::Red, "Failed to list rules!"); return; } - c->Message(0, "Rules & values in category %s:", sep->arg[2]); + c->Message(Chat::White, "Rules & values in category %s:", sep->arg[2]); std::vector::iterator cur, end; cur = rule_list.begin(); end = rule_list.end(); for(std::string tmp_value; cur != end; ++cur) { if (RuleManager::Instance()->GetRule(*cur, tmp_value)) - c->Message(0, " %s - %s", *cur, tmp_value.c_str()); + c->Message(Chat::White, " %s - %s", *cur, tmp_value.c_str()); } } @@ -8803,15 +8803,15 @@ void command_rules(Client *c, const Seperator *sep) { void command_task(Client *c, const Seperator *sep) { //super-command for managing tasks if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) { - c->Message(0, "Syntax: #task [subcommand]."); - c->Message(0, "-- Task System Commands --"); - c->Message(0, "...show - List active tasks for a client"); - c->Message(0, "...update [Count]"); - c->Message(0, "...reloadall - Reload all Task information from the database"); - c->Message(0, "...reload task - Reload Task and Activity informnation for a single task"); - c->Message(0, "...reload lists - Reload goal/reward list information"); - c->Message(0, "...reload prox - Reload proximity information"); - c->Message(0, "...reload sets - Reload task set information"); + c->Message(Chat::White, "Syntax: #task [subcommand]."); + c->Message(Chat::White, "-- Task System Commands --"); + c->Message(Chat::White, "...show - List active tasks for a client"); + c->Message(Chat::White, "...update [Count]"); + c->Message(Chat::White, "...reloadall - Reload all Task information from the database"); + c->Message(Chat::White, "...reload task - Reload Task and Activity informnation for a single task"); + c->Message(Chat::White, "...reload lists - Reload goal/reward list information"); + c->Message(Chat::White, "...reload prox - Reload proximity information"); + c->Message(Chat::White, "...reload sets - Reload task set information"); return; } @@ -8879,7 +8879,7 @@ void command_task(Client *c, const Seperator *sep) { } } - c->Message(0, "Unable to interpret command. Type #task help"); + c->Message(Chat::White, "Unable to interpret command. Type #task help"); } void command_reloadtitles(Client *c, const Seperator *sep) @@ -8898,7 +8898,7 @@ void command_traindisc(Client *c, const Seperator *sep) t = c->GetTarget()->CastToClient(); if (sep->argnum < 1 || !sep->IsNumber(1)) { - c->Message(0, "FORMAT: #traindisc "); + c->Message(Chat::White, "FORMAT: #traindisc "); return; } @@ -8911,17 +8911,17 @@ void command_traindisc(Client *c, const Seperator *sep) min_level = (uint8)RuleI(Character, MaxLevel); // default to Character:MaxLevel if we're not a GM & it's higher than the max level if(max_level < 1 || min_level < 1) { - c->Message(0, "ERROR: Level must be greater than 1."); + c->Message(Chat::White, "ERROR: Level must be greater than 1."); return; } if (min_level > max_level) { - c->Message(0, "Error: Min Level must be less than or equal to Max Level."); + c->Message(Chat::White, "Error: Min Level must be less than or equal to Max Level."); return; } - t->Message(0, "Training disciplines"); + t->Message(Chat::White, "Training disciplines"); if(t != c) - c->Message(0, "Training disciplines for %s.", t->GetName()); + c->Message(Chat::White, "Training disciplines for %s.", t->GetName()); Log(Logs::General, Logs::Normal, "Train disciplines request for %s from %s, levels: %u -> %u", t->GetName(), c->GetName(), min_level, max_level); int spell_id = 0; @@ -8963,7 +8963,7 @@ void command_traindisc(Client *c, const Seperator *sep) t->GetPP().disciplines.values[r] = spell_id_; database.SaveCharacterDisc(t->CharacterID(), r, spell_id_); change = true; - t->Message(0, "You have learned a new discipline!"); + t->Message(Chat::White, "You have learned a new discipline!"); ++count; // success counter break; // continue the 1st loop } // if we get to this point, there's already a discipline in this slot, so we continue onto the next slot @@ -8977,13 +8977,13 @@ void command_traindisc(Client *c, const Seperator *sep) t->SendDisciplineUpdate(); if (count > 0) { - t->Message(0, "Successfully trained %u disciplines.", count); + t->Message(Chat::White, "Successfully trained %u disciplines.", count); if (t != c) - c->Message(0, "Successfully trained %u disciplines for %s.", count, t->GetName()); + c->Message(Chat::White, "Successfully trained %u disciplines for %s.", count, t->GetName()); } else { - t->Message(0, "No disciplines trained."); + t->Message(Chat::White, "No disciplines trained."); if (t != c) - c->Message(0, "No disciplines trained for %s.", t->GetName()); + c->Message(Chat::White, "No disciplines trained for %s.", t->GetName()); } } @@ -8997,7 +8997,7 @@ void command_setgraveyard(Client *c, const Seperator *sep) t=c->GetTarget()->CastToClient(); if(!sep->arg[1][0]) { - c->Message(0, "Usage: #setgraveyard [zonename]"); + c->Message(Chat::White, "Usage: #setgraveyard [zonename]"); return; } @@ -9007,21 +9007,21 @@ void command_setgraveyard(Client *c, const Seperator *sep) graveyard_id = database.CreateGraveyardRecord(zoneid, t->GetPosition()); if(graveyard_id > 0) { - c->Message(0, "Successfuly added a new record for this graveyard!"); + c->Message(Chat::White, "Successfuly added a new record for this graveyard!"); if(database.AddGraveyardIDToZone(zoneid, graveyard_id) > 0) { - c->Message(0, "Successfuly added this new graveyard for the zone %s.", sep->arg[1]); + c->Message(Chat::White, "Successfuly added this new graveyard for the zone %s.", sep->arg[1]); // TODO: Set graveyard data to the running zone process. - c->Message(0, "Done!"); + c->Message(Chat::White, "Done!"); } else - c->Message(0, "Unable to add this new graveyard to the zone %s.", sep->arg[1]); + c->Message(Chat::White, "Unable to add this new graveyard to the zone %s.", sep->arg[1]); } else { - c->Message(0, "Unable to create a new graveyard record in the database."); + c->Message(Chat::White, "Unable to create a new graveyard record in the database."); } } else { - c->Message(0, "Unable to retrieve a ZoneID for the zone: %s", sep->arg[1]); + c->Message(Chat::White, "Unable to retrieve a ZoneID for the zone: %s", sep->arg[1]); } return; @@ -9033,7 +9033,7 @@ void command_deletegraveyard(Client *c, const Seperator *sep) uint32 graveyard_id = 0; if(!sep->arg[1][0]) { - c->Message(0, "Usage: #deletegraveyard [zonename]"); + c->Message(Chat::White, "Usage: #deletegraveyard [zonename]"); return; } @@ -9042,15 +9042,15 @@ void command_deletegraveyard(Client *c, const Seperator *sep) if(zoneid > 0 && graveyard_id > 0) { if(database.DeleteGraveyard(zoneid, graveyard_id)) - c->Message(0, "Successfuly deleted graveyard %u for zone %s.", graveyard_id, sep->arg[1]); + c->Message(Chat::White, "Successfuly deleted graveyard %u for zone %s.", graveyard_id, sep->arg[1]); else - c->Message(0, "Unable to delete graveyard %u for zone %s.", graveyard_id, sep->arg[1]); + c->Message(Chat::White, "Unable to delete graveyard %u for zone %s.", graveyard_id, sep->arg[1]); } else { if(zoneid <= 0) - c->Message(0, "Unable to retrieve a ZoneID for the zone: %s", sep->arg[1]); + c->Message(Chat::White, "Unable to retrieve a ZoneID for the zone: %s", sep->arg[1]); else if(graveyard_id <= 0) - c->Message(0, "Unable to retrieve a valid GraveyardID for the zone: %s", sep->arg[1]); + c->Message(Chat::White, "Unable to retrieve a valid GraveyardID for the zone: %s", sep->arg[1]); } return; @@ -9063,14 +9063,14 @@ void command_summonburiedplayercorpse(Client *c, const Seperator *sep) if(c->GetTarget() && c->GetTarget()->IsClient() && c->GetGM()) t = c->GetTarget()->CastToClient(); else { - c->Message(0, "You must first select a target!"); + c->Message(Chat::White, "You must first select a target!"); return; } Corpse* PlayerCorpse = database.SummonBuriedCharacterCorpses(t->CharacterID(), t->GetZoneID(), zone->GetInstanceID(), t->GetPosition()); if(!PlayerCorpse) - c->Message(0, "Your target doesn't have any buried corpses."); + c->Message(Chat::White, "Your target doesn't have any buried corpses."); return; } @@ -9082,16 +9082,16 @@ void command_getplayerburiedcorpsecount(Client *c, const Seperator *sep) if(c->GetTarget() && c->GetTarget()->IsClient() && c->GetGM()) t = c->GetTarget()->CastToClient(); else { - c->Message(0, "You must first select a target!"); + c->Message(Chat::White, "You must first select a target!"); return; } uint32 CorpseCount = database.GetCharacterBuriedCorpseCount(t->CharacterID()); if(CorpseCount > 0) - c->Message(0, "Your target has a total of %u buried corpses.", CorpseCount); + c->Message(Chat::White, "Your target has a total of %u buried corpses.", CorpseCount); else - c->Message(0, "Your target doesn't have any buried corpses."); + c->Message(Chat::White, "Your target doesn't have any buried corpses."); return; } @@ -9116,7 +9116,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "maketype") == 0) { if(!target || !target->IsNPC()) { - c->Message(0, "Target Required!"); + c->Message(Chat::White, "Target Required!"); return; } @@ -9126,7 +9126,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "makegroup") == 0) { if(!sep->arg[2]) { - c->Message(0, "Format: #advnpdspawn makegroup [spawn limit] [dist] [max x] [min x] [max y] [min y] [delay]"); + c->Message(Chat::White, "Format: #advnpdspawn makegroup [spawn limit] [dist] [max x] [min x] [max y] [min y] [delay]"); return; } @@ -9143,18 +9143,18 @@ void command_advnpcspawn(Client *c, const Seperator *sep) (sep->arg[9]? atoi(sep->arg[9]): 0)); auto results = database.QueryDatabase(query); if (!results.Success()) { - c->Message(0, "Invalid Arguments -- MySQL gave the following error:"); + c->Message(Chat::White, "Invalid Arguments -- MySQL gave the following error:"); c->Message(Chat::Red, results.ErrorMessage().c_str()); return; } - c->Message(0, "Group ID %i created successfully!", results.LastInsertedID()); + c->Message(Chat::White, "Group ID %i created successfully!", results.LastInsertedID()); return; } if (strcasecmp(sep->arg[1], "addgroupentry") == 0) { if(!atoi(sep->arg[2]) || !atoi(sep->arg[3]) || !atoi(sep->arg[4])) { - c->Message(0, "Format: #advnpdspawn addgroupentry "); + c->Message(Chat::White, "Format: #advnpdspawn addgroupentry "); return; } @@ -9163,19 +9163,19 @@ void command_advnpcspawn(Client *c, const Seperator *sep) atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); auto results = database.QueryDatabase(query); if (!results.Success()) { - c->Message(0, "Invalid Arguments -- MySQL gave the following error:"); + c->Message(Chat::White, "Invalid Arguments -- MySQL gave the following error:"); c->Message(Chat::Red, results.ErrorMessage().c_str()); return; } - c->Message(0, "NPC %i added to group %i with %i chance!", atoi(sep->arg[3]), atoi(sep->arg[2]), atoi(sep->arg[4]) ); + c->Message(Chat::White, "NPC %i added to group %i with %i chance!", atoi(sep->arg[3]), atoi(sep->arg[2]), atoi(sep->arg[4]) ); return; } if (strcasecmp(sep->arg[1], "editgroupbox") == 0) { if(!atof(sep->arg[2]) || !atof(sep->arg[3]) || !atof(sep->arg[4]) || !atof(sep->arg[5]) || !atof(sep->arg[6]) || !atof(sep->arg[7]) || !atof(sep->arg[8])) { - c->Message(0, "Format: #advnpdspawn editgroupbox "); + c->Message(Chat::White, "Format: #advnpdspawn editgroupbox "); return; } @@ -9186,19 +9186,19 @@ void command_advnpcspawn(Client *c, const Seperator *sep) atoi(sep->arg[2])); auto results = database.QueryDatabase(query); if (!results.Success()) { - c->Message(0, "Invalid Arguments -- MySQL gave the following error:"); + c->Message(Chat::White, "Invalid Arguments -- MySQL gave the following error:"); c->Message(Chat::Red, results.ErrorMessage().c_str()); return; } - c->Message(0, "Group ID %i created successfully!", results.LastInsertedID()); + c->Message(Chat::White, "Group ID %i created successfully!", results.LastInsertedID()); return; } if (strcasecmp(sep->arg[1], "cleargroupbox") == 0) { if(!atoi(sep->arg[2])) { - c->Message(0, "Format: #advnpdspawn cleargroupbox "); + c->Message(Chat::White, "Format: #advnpdspawn cleargroupbox "); return; } @@ -9208,32 +9208,32 @@ void command_advnpcspawn(Client *c, const Seperator *sep) "WHERE id = '%i' ", atoi(sep->arg[2])); auto results = database.QueryDatabase(query); if (!results.Success()) { - c->Message(0, "Invalid Arguments -- MySQL gave the following error:"); + c->Message(Chat::White, "Invalid Arguments -- MySQL gave the following error:"); c->Message(Chat::Red, results.ErrorMessage().c_str()); return; } - c->Message(0, "Group ID %i created successfully!", results.LastInsertedID()); + c->Message(Chat::White, "Group ID %i created successfully!", results.LastInsertedID()); return; } if (strcasecmp(sep->arg[1], "addgroupspawn") == 0 && atoi(sep->arg[2])!=0) { database.NPCSpawnDB(5, zone->GetShortName(), zone->GetInstanceVersion(), c, 0, atoi(sep->arg[2])); - c->Message(0, "Mob of group %i added successfully!", atoi(sep->arg[2])); + c->Message(Chat::White, "Mob of group %i added successfully!", atoi(sep->arg[2])); return; } if (strcasecmp(sep->arg[1], "removegroupspawn") == 0) { if (!target || !target->IsNPC()) { - c->Message(0, "Error: Need an NPC target."); + c->Message(Chat::White, "Error: Need an NPC target."); return; } Spawn2* s2 = target->CastToNPC()->respawn2; if(!s2) { - c->Message(0, "removegroupspawn FAILED -- cannot determine which spawn entry in the database this mob came from."); + c->Message(Chat::White, "removegroupspawn FAILED -- cannot determine which spawn entry in the database this mob came from."); return; } @@ -9245,7 +9245,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) return; } - c->Message(0, "Spawnpoint Removed successfully."); + c->Message(Chat::White, "Spawnpoint Removed successfully."); target->Depop(false); return; @@ -9253,14 +9253,14 @@ void command_advnpcspawn(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "movespawn") == 0) { if (!target || !target->IsNPC()) { - c->Message(0, "Error: Need an NPC target."); + c->Message(Chat::White, "Error: Need an NPC target."); return; } Spawn2* s2 = target->CastToNPC()->respawn2; if(!s2) { - c->Message(0, "movespawn FAILED -- cannot determine which spawn entry in the database this mob came from."); + c->Message(Chat::White, "movespawn FAILED -- cannot determine which spawn entry in the database this mob came from."); return; } @@ -9274,7 +9274,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) return; } - c->Message(0, "Updating coordinates successful."); + c->Message(Chat::White, "Updating coordinates successful."); target->GMMove(c->GetX(), c->GetY(), c->GetZ(), c->GetHeading()); return; @@ -9282,7 +9282,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "editrespawn") == 0) { if (!target || !target->IsNPC()) { - c->Message(0, "Error: Need an NPC target."); + c->Message(Chat::White, "Error: Need an NPC target."); return; } @@ -9291,7 +9291,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) uint32 new_rs = 0; uint32 new_var = s2->GetVariance(); if(!sep->IsNumber(2)) { - c->Message(0, "editrespawn FAILED -- cannot set respawn to be 0"); + c->Message(Chat::White, "editrespawn FAILED -- cannot set respawn to be 0"); return; } @@ -9301,7 +9301,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) new_var = atoi(sep->arg[3]); if(!s2) { - c->Message(0, "editrespawn FAILED -- cannot determine which spawn entry in the database this mob came from."); + c->Message(Chat::White, "editrespawn FAILED -- cannot determine which spawn entry in the database this mob came from."); return; } @@ -9314,7 +9314,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) return; } - c->Message(0, "Updating respawn timer successful."); + c->Message(Chat::White, "Updating respawn timer successful."); s2->SetRespawnTimer(new_rs); s2->SetVariance(new_var); @@ -9323,12 +9323,12 @@ void command_advnpcspawn(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "setversion") == 0) { if (!target || !target->IsNPC()) { - c->Message(0, "Error: Need an NPC target."); + c->Message(Chat::White, "Error: Need an NPC target."); return; } if(!sep->IsNumber(2)) { - c->Message(0, "setversion FAILED -- You must set a version number"); + c->Message(Chat::White, "setversion FAILED -- You must set a version number"); return; } @@ -9343,7 +9343,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep) return; } - c->Message(0, "Version change to %i was successful from SpawnGroupID %i", version, c->GetTarget()->CastToNPC()->GetSp2()); + c->Message(Chat::White, "Version change to %i was successful from SpawnGroupID %i", version, c->GetTarget()->CastToNPC()->GetSp2()); c->GetTarget()->Depop(false); return; @@ -9351,13 +9351,13 @@ void command_advnpcspawn(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "testload") == 0 && atoi(sep->arg[2])!=0) { database.LoadSpawnGroupsByID(atoi(sep->arg[2]),&zone->spawn_group_list); - c->Message(0, "Group %i loaded successfully!", atoi(sep->arg[2])); + c->Message(Chat::White, "Group %i loaded successfully!", atoi(sep->arg[2])); return; } - c->Message(0, "Error: #advnpcspawn: Invalid command."); - c->Message(0, "Usage: #advnpcspawn [maketype|makegroup|addgroupentry|addgroupspawn|setversion]"); - c->Message(0, "Usage: #advnpcspawn [removegroupspawn|movespawn|editrespawn|editgroupbox|cleargroupbox]"); + c->Message(Chat::White, "Error: #advnpcspawn: Invalid command."); + c->Message(Chat::White, "Usage: #advnpcspawn [maketype|makegroup|addgroupentry|addgroupspawn|setversion]"); + c->Message(Chat::White, "Usage: #advnpcspawn [removegroupspawn|movespawn|editrespawn|editgroupbox|cleargroupbox]"); } void command_aggrozone(Client *c, const Seperator *sep) { @@ -9371,7 +9371,7 @@ void command_aggrozone(Client *c, const Seperator *sep) { uint32 hate = atoi(sep->arg[1]); //should default to 0 if we don't enter anything entity_list.AggroZone(m, hate); - c->Message(0, "Train to you! Last chance to go invulnerable..."); + c->Message(Chat::White, "Train to you! Last chance to go invulnerable..."); } void command_modifynpcstat(Client *c, const Seperator *sep) @@ -9381,8 +9381,8 @@ void command_modifynpcstat(Client *c, const Seperator *sep) if(sep->arg[1][0] == '\0') { - c->Message(0, "usage #modifynpcstat arg value"); - c->Message(0, "Args: ac, str, sta, agi, dex, wis, _int, cha, max_hp, mr, fr, cr, pr, dr, runspeed, special_attacks, " + c->Message(Chat::White, "usage #modifynpcstat arg value"); + c->Message(Chat::White, "Args: ac, str, sta, agi, dex, wis, _int, cha, max_hp, mr, fr, cr, pr, dr, runspeed, special_attacks, " "attack_speed, atk, accuracy, trackable, min_hit, max_hit, see_invis_undead, see_hide, see_improved_hide, " "hp_regen, mana_regen, aggro, assist, slow_mitigation, loottable_id, healscale, spellscale"); return; @@ -9412,22 +9412,22 @@ void command_instance(Client *c, const Seperator *sep) if(strcasecmp(sep->arg[1], "help") == 0) { - c->Message(0, "#instance usage:"); - c->Message(0, "#instance create zone_id version duration - Creates an instance of version 'version' in the " + c->Message(Chat::White, "#instance usage:"); + c->Message(Chat::White, "#instance create zone_id version duration - Creates an instance of version 'version' in the " "zone with id matching zone_id, will last for duration seconds."); - c->Message(0, "#instance destroy instance_id - Destroys the instance with id matching instance_id."); - c->Message(0, "#instance add instance_id player_name - adds the player 'player_name' to the instance " + c->Message(Chat::White, "#instance destroy instance_id - Destroys the instance with id matching instance_id."); + c->Message(Chat::White, "#instance add instance_id player_name - adds the player 'player_name' to the instance " "with id matching instance_id."); - c->Message(0, "#instance remove instance_id player_name - removes the player 'player_name' from the " + c->Message(Chat::White, "#instance remove instance_id player_name - removes the player 'player_name' from the " "instance with id matching instance_id."); - c->Message(0, "#instance list player_name - lists all the instances 'player_name' is apart of."); + c->Message(Chat::White, "#instance list player_name - lists all the instances 'player_name' is apart of."); return; } else if(strcasecmp(sep->arg[1], "create") == 0) { if(!sep->IsNumber(3) || !sep->IsNumber(4)) { - c->Message(0, "#instance create zone_id version duration - Creates an instance of version 'version' in the " + c->Message(Chat::White, "#instance create zone_id version duration - Creates an instance of version 'version' in the " "zone with id matching zone_id, will last for duration seconds."); return; } @@ -9450,42 +9450,42 @@ void command_instance(Client *c, const Seperator *sep) if(!zn) { - c->Message(0, "Zone with id %lu was not found by the server.", (unsigned long)zone_id); + c->Message(Chat::White, "Zone with id %lu was not found by the server.", (unsigned long)zone_id); return; } uint16 id = 0; if(!database.GetUnusedInstanceID(id)) { - c->Message(0, "Server was unable to find a free instance id."); + c->Message(Chat::White, "Server was unable to find a free instance id."); return; } if(!database.CreateInstance(id, zone_id, version, duration)) { - c->Message(0, "Server was unable to create a new instance."); + c->Message(Chat::White, "Server was unable to create a new instance."); return; } - c->Message(0, "New instance %s was created with id %lu.", zn, (unsigned long)id); + c->Message(Chat::White, "New instance %s was created with id %lu.", zn, (unsigned long)id); } else if(strcasecmp(sep->arg[1], "destroy") == 0) { if(!sep->IsNumber(2)) { - c->Message(0, "#instance destroy instance_id - Destroys the instance with id matching instance_id."); + c->Message(Chat::White, "#instance destroy instance_id - Destroys the instance with id matching instance_id."); return; } uint16 id = atoi(sep->arg[2]); database.DeleteInstance(id); - c->Message(0, "Destroyed instance with id %lu.", (unsigned long)id); + c->Message(Chat::White, "Destroyed instance with id %lu.", (unsigned long)id); } else if(strcasecmp(sep->arg[1], "add") == 0) { if(!sep->IsNumber(2)) { - c->Message(0, "#instance add instance_id player_name - adds the player 'player_name' to the instance " + c->Message(Chat::White, "#instance add instance_id player_name - adds the player 'player_name' to the instance " "with id matching instance_id."); return; } @@ -9495,13 +9495,13 @@ void command_instance(Client *c, const Seperator *sep) if(id <= 0 || charid <= 0) { - c->Message(0, "Must enter a valid instance id and player name."); + c->Message(Chat::White, "Must enter a valid instance id and player name."); return; } if(!database.CheckInstanceExists(id)) { - c->Message(0, "Instance does not exist."); + c->Message(Chat::White, "Instance does not exist."); return; } @@ -9512,23 +9512,23 @@ void command_instance(Client *c, const Seperator *sep) { if(database.AddClientToInstance(id, charid)) { - c->Message(0, "Added client to instance."); + c->Message(Chat::White, "Added client to instance."); } else { - c->Message(0, "Failed to add client to instance."); + c->Message(Chat::White, "Failed to add client to instance."); } } else { - c->Message(0, "Client was already saved to %u which has uses the same zone and version as that instance.", cur_id); + c->Message(Chat::White, "Client was already saved to %u which has uses the same zone and version as that instance.", cur_id); } } else if(strcasecmp(sep->arg[1], "remove") == 0) { if(!sep->IsNumber(2)) { - c->Message(0, "#instance remove instance_id player_name - removes the player 'player_name' from the " + c->Message(Chat::White, "#instance remove instance_id player_name - removes the player 'player_name' from the " "instance with id matching instance_id."); return; } @@ -9538,16 +9538,16 @@ void command_instance(Client *c, const Seperator *sep) if(id <= 0 || charid <= 0) { - c->Message(0, "Must enter a valid instance id and player name."); + c->Message(Chat::White, "Must enter a valid instance id and player name."); } if(database.RemoveClientFromInstance(id, charid)) { - c->Message(0, "Removed client from instance."); + c->Message(Chat::White, "Removed client from instance."); } else { - c->Message(0, "Failed to remove client from instance."); + c->Message(Chat::White, "Failed to remove client from instance."); } } else if(strcasecmp(sep->arg[1], "list") == 0) @@ -9557,7 +9557,7 @@ void command_instance(Client *c, const Seperator *sep) { if(c->GetTarget() == nullptr || (c->GetTarget() && !c->GetTarget()->IsClient())) { - c->Message(0, "Character not found."); + c->Message(Chat::White, "Character not found."); return; } else @@ -9568,16 +9568,16 @@ void command_instance(Client *c, const Seperator *sep) } else { - c->Message(0, "Invalid Argument."); - c->Message(0, "#instance usage:"); - c->Message(0, "#instance create zone_id version duration - Creates an instance of version 'version' in the " + c->Message(Chat::White, "Invalid Argument."); + c->Message(Chat::White, "#instance usage:"); + c->Message(Chat::White, "#instance create zone_id version duration - Creates an instance of version 'version' in the " "zone with id matching zone_id, will last for duration seconds."); - c->Message(0, "#instance destroy instance_id - Destroys the instance with id matching instance_id."); - c->Message(0, "#instance add instance_id player_name - adds the player 'player_name' to the instance " + c->Message(Chat::White, "#instance destroy instance_id - Destroys the instance with id matching instance_id."); + c->Message(Chat::White, "#instance add instance_id player_name - adds the player 'player_name' to the instance " "with id matching instance_id."); - c->Message(0, "#instance remove instance_id player_name - removes the player 'player_name' from the " + c->Message(Chat::White, "#instance remove instance_id player_name - removes the player 'player_name' from the " "instance with id matching instance_id."); - c->Message(0, "#instance list player_name - lists all the instances 'player_name' is apart of."); + c->Message(Chat::White, "#instance list player_name - lists all the instances 'player_name' is apart of."); return; } } @@ -9589,8 +9589,8 @@ void command_setstartzone(Client *c, const Seperator *sep) if(c->GetTarget() && c->GetTarget()->IsClient() && sep->arg[1][0] != 0) target = c->GetTarget()->CastToClient(); else { - c->Message(0, "Usage: (needs PC target) #setstartzone zonename"); - c->Message(0, "Optional Usage: Use '#setstartzone reset' or '#setstartzone 0' to clear a starting zone. Player can select a starting zone using /setstartcity"); + c->Message(Chat::White, "Usage: (needs PC target) #setstartzone zonename"); + c->Message(Chat::White, "Optional Usage: Use '#setstartzone reset' or '#setstartzone 0' to clear a starting zone. Player can select a starting zone using /setstartcity"); return; } @@ -9603,7 +9603,7 @@ void command_setstartzone(Client *c, const Seperator *sep) else { startzone = database.GetZoneID(sep->arg[1]); if(startzone == 0) { - c->Message(0, "Unable to locate zone '%s'", sep->arg[1]); + c->Message(Chat::White, "Unable to locate zone '%s'", sep->arg[1]); return; } } @@ -9622,7 +9622,7 @@ void command_netstats(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "reset") == 0) { auto connection = c->Connection(); - c->Message(0, "Resetting client stats (packet loss will not read correctly after reset)."); + c->Message(Chat::White, "Resetting client stats (packet loss will not read correctly after reset)."); connection->ResetStats(); return; } @@ -9634,58 +9634,58 @@ void command_netstats(Client *c, const Seperator *sep) auto now = EQ::Net::Clock::now(); auto sec_since_stats_reset = std::chrono::duration_cast>(now - stats.created).count(); - c->Message(0, "Netstats:"); - c->Message(0, "--------------------------------------------------------------------"); - c->Message(0, "Sent Bytes: %u (%.2f/sec)", stats.sent_bytes, stats.sent_bytes / sec_since_stats_reset); - c->Message(0, "Recv Bytes: %u (%.2f/sec)", stats.recv_bytes, stats.recv_bytes / sec_since_stats_reset); - c->Message(0, "Bytes Before Encode (Sent): %u, Compression Rate: %.2f%%", stats.bytes_before_encode, + c->Message(Chat::White, "Netstats:"); + c->Message(Chat::White, "--------------------------------------------------------------------"); + c->Message(Chat::White, "Sent Bytes: %u (%.2f/sec)", stats.sent_bytes, stats.sent_bytes / sec_since_stats_reset); + c->Message(Chat::White, "Recv Bytes: %u (%.2f/sec)", stats.recv_bytes, stats.recv_bytes / sec_since_stats_reset); + c->Message(Chat::White, "Bytes Before Encode (Sent): %u, Compression Rate: %.2f%%", stats.bytes_before_encode, static_cast(stats.bytes_before_encode - stats.sent_bytes) / static_cast(stats.bytes_before_encode) * 100.0); - c->Message(0, "Bytes After Decode (Recv): %u, Compression Rate: %.2f%%", stats.bytes_after_decode, + c->Message(Chat::White, "Bytes After Decode (Recv): %u, Compression Rate: %.2f%%", stats.bytes_after_decode, static_cast(stats.bytes_after_decode - stats.recv_bytes) / static_cast(stats.bytes_after_decode) * 100.0); - c->Message(0, "Min Ping: %u", stats.min_ping); - c->Message(0, "Max Ping: %u", stats.max_ping); - c->Message(0, "Last Ping: %u", stats.last_ping); - c->Message(0, "Average Ping: %u", stats.avg_ping); - c->Message(0, "--------------------------------------------------------------------"); - c->Message(0, "(Realtime) Recv Packets: %u (%.2f/sec)", stats.recv_packets, stats.recv_packets / sec_since_stats_reset); - c->Message(0, "(Realtime) Sent Packets: %u (%.2f/sec)", stats.sent_packets, stats.sent_packets / sec_since_stats_reset); - c->Message(0, "(Sync) Recv Packets: %u", stats.sync_recv_packets); - c->Message(0, "(Sync) Sent Packets: %u", stats.sync_sent_packets); - c->Message(0, "(Sync) Remote Recv Packets: %u", stats.sync_remote_recv_packets); - c->Message(0, "(Sync) Remote Sent Packets: %u", stats.sync_remote_sent_packets); - c->Message(0, "Packet Loss In: %.2f%%", 100.0 * (1.0 - static_cast(stats.sync_recv_packets) / static_cast(stats.sync_remote_sent_packets))); - c->Message(0, "Packet Loss Out: %.2f%%", 100.0 * (1.0 - static_cast(stats.sync_remote_recv_packets) / static_cast(stats.sync_sent_packets))); - c->Message(0, "--------------------------------------------------------------------"); - c->Message(0, "Resent Packets: %u (%.2f/sec)", stats.resent_packets, stats.resent_packets / sec_since_stats_reset); - c->Message(0, "Resent Fragments: %u (%.2f/sec)", stats.resent_fragments, stats.resent_fragments / sec_since_stats_reset); - c->Message(0, "Resent Non-Fragments: %u (%.2f/sec)", stats.resent_full, stats.resent_full / sec_since_stats_reset); - c->Message(0, "Dropped Datarate Packets: %u (%.2f/sec)", stats.dropped_datarate_packets, stats.dropped_datarate_packets / sec_since_stats_reset); + c->Message(Chat::White, "Min Ping: %u", stats.min_ping); + c->Message(Chat::White, "Max Ping: %u", stats.max_ping); + c->Message(Chat::White, "Last Ping: %u", stats.last_ping); + c->Message(Chat::White, "Average Ping: %u", stats.avg_ping); + c->Message(Chat::White, "--------------------------------------------------------------------"); + c->Message(Chat::White, "(Realtime) Recv Packets: %u (%.2f/sec)", stats.recv_packets, stats.recv_packets / sec_since_stats_reset); + c->Message(Chat::White, "(Realtime) Sent Packets: %u (%.2f/sec)", stats.sent_packets, stats.sent_packets / sec_since_stats_reset); + c->Message(Chat::White, "(Sync) Recv Packets: %u", stats.sync_recv_packets); + c->Message(Chat::White, "(Sync) Sent Packets: %u", stats.sync_sent_packets); + c->Message(Chat::White, "(Sync) Remote Recv Packets: %u", stats.sync_remote_recv_packets); + c->Message(Chat::White, "(Sync) Remote Sent Packets: %u", stats.sync_remote_sent_packets); + c->Message(Chat::White, "Packet Loss In: %.2f%%", 100.0 * (1.0 - static_cast(stats.sync_recv_packets) / static_cast(stats.sync_remote_sent_packets))); + c->Message(Chat::White, "Packet Loss Out: %.2f%%", 100.0 * (1.0 - static_cast(stats.sync_remote_recv_packets) / static_cast(stats.sync_sent_packets))); + c->Message(Chat::White, "--------------------------------------------------------------------"); + c->Message(Chat::White, "Resent Packets: %u (%.2f/sec)", stats.resent_packets, stats.resent_packets / sec_since_stats_reset); + c->Message(Chat::White, "Resent Fragments: %u (%.2f/sec)", stats.resent_fragments, stats.resent_fragments / sec_since_stats_reset); + c->Message(Chat::White, "Resent Non-Fragments: %u (%.2f/sec)", stats.resent_full, stats.resent_full / sec_since_stats_reset); + c->Message(Chat::White, "Dropped Datarate Packets: %u (%.2f/sec)", stats.dropped_datarate_packets, stats.dropped_datarate_packets / sec_since_stats_reset); if (opts.daybreak_options.outgoing_data_rate > 0.0) { - c->Message(0, "Outgoing Link Saturation %.2f%% (%.2fkb/sec)", 100.0 * (1.0 - ((opts.daybreak_options.outgoing_data_rate - stats.datarate_remaining) / opts.daybreak_options.outgoing_data_rate)), opts.daybreak_options.outgoing_data_rate); + c->Message(Chat::White, "Outgoing Link Saturation %.2f%% (%.2fkb/sec)", 100.0 * (1.0 - ((opts.daybreak_options.outgoing_data_rate - stats.datarate_remaining) / opts.daybreak_options.outgoing_data_rate)), opts.daybreak_options.outgoing_data_rate); } if (strcasecmp(sep->arg[1], "full") == 0) { - c->Message(0, "--------------------------------------------------------------------"); - c->Message(0, "Sent Packet Types"); + c->Message(Chat::White, "--------------------------------------------------------------------"); + c->Message(Chat::White, "Sent Packet Types"); for (auto i = 0; i < _maxEmuOpcode; ++i) { auto cnt = eqs_stats.SentCount[i]; if (cnt > 0) { - c->Message(0, "%s: %u (%.2f / sec)", OpcodeNames[i], cnt, cnt / sec_since_stats_reset); + c->Message(Chat::White, "%s: %u (%.2f / sec)", OpcodeNames[i], cnt, cnt / sec_since_stats_reset); } } - c->Message(0, "--------------------------------------------------------------------"); - c->Message(0, "Recv Packet Types"); + c->Message(Chat::White, "--------------------------------------------------------------------"); + c->Message(Chat::White, "Recv Packet Types"); for (auto i = 0; i < _maxEmuOpcode; ++i) { auto cnt = eqs_stats.RecvCount[i]; if (cnt > 0) { - c->Message(0, "%s: %u (%.2f / sec)", OpcodeNames[i], cnt, cnt / sec_since_stats_reset); + c->Message(Chat::White, "%s: %u (%.2f / sec)", OpcodeNames[i], cnt, cnt / sec_since_stats_reset); } } } - c->Message(0, "--------------------------------------------------------------------"); + c->Message(Chat::White, "--------------------------------------------------------------------"); } } @@ -9698,7 +9698,7 @@ void command_object(Client *c, const Seperator *sep) const char *usage_string = "Usage: #object List|Add|Edit|Move|Rotate|Save|Copy|Delete|Undo"; if ((!sep) || (sep->argnum == 0)) { - c->Message(0, usage_string); + c->Message(Chat::White, usage_string); return; } @@ -9731,7 +9731,7 @@ void command_object(Client *c, const Seperator *sep) // Insufficient or invalid args if ((sep->argnum < 2) || (sep->arg[2][0] < '0') || ((sep->arg[2][0] > '9') && ((sep->arg[2][0] & 0xDF) != 'A'))) { - c->Message(0, "Usage: #object List All|(radius)"); + c->Message(Chat::White, "Usage: #object List All|(radius)"); return; } @@ -9741,9 +9741,9 @@ void command_object(Client *c, const Seperator *sep) radius = 500; // Invalid radius. Default to 500 units. if (radius == 0) - c->Message(0, "Objects within this zone:"); + c->Message(Chat::White, "Objects within this zone:"); else - c->Message(0, "Objects within %u units of your current location:", radius); + c->Message(Chat::White, "Objects within %u units of your current location:", radius); std::string query; if (radius) @@ -9768,7 +9768,7 @@ void command_object(Client *c, const Seperator *sep) auto results = database.QueryDatabase(query); if (!results.Success()) { - c->Message(0, "Error in objects query"); + c->Message(Chat::White, "Error in objects query"); return; } @@ -9795,27 +9795,27 @@ void command_object(Client *c, const Seperator *sep) if (od.size == 0) // Unknown08 field is optional Size parameter for static objects od.size = 100; // Static object default Size is 100% - c->Message(0, "- STATIC Object (%s): id %u, x %.1f, y %.1f, z %.1f, h %.1f, model %s, " + c->Message(Chat::White, "- STATIC Object (%s): id %u, x %.1f, y %.1f, z %.1f, h %.1f, model %s, " "size %u, solidtype %u, incline %u", (od.object_type == 0) ? "locked" : "unlocked", id, od.x, od.y, od.z, od.heading, od.object_name, od.size, od.solidtype, od.unknown020); break; case OT_DROPPEDITEM: // Ground Spawn - c->Message(0, "- TEMPORARY Object: id %u, x %.1f, y %.1f, z %.1f, h %.1f, itemid %u, " + c->Message(Chat::White, "- TEMPORARY Object: id %u, x %.1f, y %.1f, z %.1f, h %.1f, itemid %u, " "model %s, icon %u", id, od.x, od.y, od.z, od.heading, itemid, od.object_name, icon); break; default: // All others == Tradeskill Objects - c->Message(0, "- TRADESKILL Object: id %u, x %.1f, y %.1f, z %.1f, h %.1f, model %s, " + c->Message(Chat::White, "- TRADESKILL Object: id %u, x %.1f, y %.1f, z %.1f, h %.1f, model %s, " "type %u, icon %u", id, od.x, od.y, od.z, od.heading, od.object_name, od.object_type, icon); break; } } - c->Message(0, "%u object%s found", results.RowCount(), (results.RowCount() == 1) ? "" : "s"); + c->Message(Chat::White, "%u object%s found", results.RowCount(), (results.RowCount() == 1) ? "" : "s"); return; } @@ -9823,10 +9823,10 @@ void command_object(Client *c, const Seperator *sep) // Insufficient or invalid arguments if ((sep->argnum < 3) || ((sep->arg[3][0] == '\0') && (sep->arg[4][0] < '0') && (sep->arg[4][0] > '9'))) { - c->Message(0, "Usage: (Static Object): #object Add [ObjectID] 0 Model [SizePercent] " + c->Message(Chat::White, "Usage: (Static Object): #object Add [ObjectID] 0 Model [SizePercent] " "[SolidType] [Incline]"); - c->Message(0, "Usage: (Tradeskill Object): #object Add [ObjectID] TypeNum Model Icon"); - c->Message(0, "- Notes: Model must start with a letter, max length 16. SolidTypes = 0 (Solid), " + c->Message(Chat::White, "Usage: (Tradeskill Object): #object Add [ObjectID] TypeNum Model Icon"); + c->Message(Chat::White, "- Notes: Model must start with a letter, max length 16. SolidTypes = 0 (Solid), " "1 (Sometimes Non-Solid)"); return; } @@ -9868,7 +9868,7 @@ void command_object(Client *c, const Seperator *sep) break; case 1: // Ground Spawn - c->Message(0, "ERROR: Object Type 1 is used for temporarily spawned ground spawns and dropped " + c->Message(Chat::White, "ERROR: Object Type 1 is used for temporarily spawned ground spawns and dropped " "items, which are not supported with #object. See the 'ground_spawns' table in " "the database."); return; @@ -9877,7 +9877,7 @@ void command_object(Client *c, const Seperator *sep) icon = ((sep->argnum - col) > 3) ? atoi(sep->arg[4 + col]) : 0; if (icon == 0) { - c->Message(0, "ERROR: Required property 'Icon' not specified for Tradeskill Object"); + c->Message(Chat::White, "ERROR: Required property 'Icon' not specified for Tradeskill Object"); return; } @@ -9906,7 +9906,7 @@ void command_object(Client *c, const Seperator *sep) id = 0; if (id == 0) { - c->Message(0, "ERROR: An object already exists with the id %u", atoi(sep->arg[2])); + c->Message(Chat::White, "ERROR: An object already exists with the id %u", atoi(sep->arg[2])); return; } } @@ -9934,7 +9934,7 @@ void command_object(Client *c, const Seperator *sep) objectsFound = 1; if (objectsFound) { - c->Message(0, "ERROR: Object already at this location."); + c->Message(Chat::White, "ERROR: Object already at this location."); return; } @@ -9955,7 +9955,7 @@ void command_object(Client *c, const Seperator *sep) strupr(od.object_name); // Model names are always upper-case. if ((od.object_name[0] < 'A') || (od.object_name[0] > 'Z')) { - c->Message(0, "ERROR: Model name must start with a letter."); + c->Message(Chat::White, "ERROR: Model name must start with a letter."); return; } @@ -9996,13 +9996,13 @@ void command_object(Client *c, const Seperator *sep) y2 = 10.0f * cos(c->GetHeading() / 256.0f * 3.14159265f); c->MovePC(c->GetX() - x2, c->GetY() - y2, c->GetZ(), c->GetHeading()); - c->Message(0, "Spawning object with tentative id %u at location (%.1f, %.1f, %.1f heading %.1f). Use " + c->Message(Chat::White, "Spawning object with tentative id %u at location (%.1f, %.1f, %.1f heading %.1f). Use " "'#object Save' to save to database when satisfied with placement.", id, od.x, od.y, od.z, od.heading); // Temporary Static Object if (od.object_type == staticType) - c->Message(0, "- Note: Static Object will act like a tradeskill container and will not reflect " + c->Message(Chat::White, "- Note: Static Object will act like a tradeskill container and will not reflect " "size, solidtype, or incline values until you commit with '#object Save', after " "which it will be unchangeable until you use '#object Edit' and zone back in."); @@ -10012,9 +10012,9 @@ void command_object(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "edit") == 0) { if ((sep->argnum < 2) || ((id = atoi(sep->arg[2])) < 1)) { - c->Message(0, "Usage: #object Edit (ObjectID) [PropertyName] [NewValue]"); - c->Message(0, "- Static Object (Type 0) Properties: model, type, size, solidtype, incline"); - c->Message(0, "- Tradeskill Object (Type 2+) Properties: model, type, icon"); + c->Message(Chat::White, "Usage: #object Edit (ObjectID) [PropertyName] [NewValue]"); + c->Message(Chat::White, "- Static Object (Type 0) Properties: model, type, size, solidtype, incline"); + c->Message(Chat::White, "- Tradeskill Object (Type 2+) Properties: model, type, icon"); return; } @@ -10026,7 +10026,7 @@ void command_object(Client *c, const Seperator *sep) // Yep, looks like we can make real-time changes. if (sep->argnum < 4) { // Or not. '#object Edit (ObjectID)' called without PropertyName and NewValue - c->Message(0, "Note: Object %u already unlocked and ready for changes", id); + c->Message(Chat::White, "Note: Object %u already unlocked and ready for changes", id); return; } } else { @@ -10034,7 +10034,7 @@ void command_object(Client *c, const Seperator *sep) std::string query = StringFormat("SELECT zoneid, version, type FROM object WHERE id = %u", id); auto results = database.QueryDatabase(query); if (!results.Success() || results.RowCount() == 0) { - c->Message(0, "ERROR: Object %u not found", id); + c->Message(Chat::White, "ERROR: Object %u not found", id); return; } @@ -10046,13 +10046,13 @@ void command_object(Client *c, const Seperator *sep) // Object not in this zone? if (od.zone_id != zone->GetZoneID()) { - c->Message(0, "ERROR: Object %u not in this zone.", id); + c->Message(Chat::White, "ERROR: Object %u not in this zone.", id); return; } // Object not in this instance? if (od.zone_instance != zone->GetInstanceVersion()) { - c->Message(0, "ERROR: Object %u not part of this instance version.", id); + c->Message(Chat::White, "ERROR: Object %u not part of this instance version.", id); return; } @@ -10063,23 +10063,23 @@ void command_object(Client *c, const Seperator *sep) database.QueryDatabase(query); - c->Message(0, "Static Object %u unlocked for editing. You must zone out and back in to " + c->Message(Chat::White, "Static Object %u unlocked for editing. You must zone out and back in to " "make your changes, then commit them with '#object Save'.", id); if (sep->argnum >= 4) - c->Message(0, "NOTE: The change you specified has not been applied, since the " + c->Message(Chat::White, "NOTE: The change you specified has not been applied, since the " "static object had not been unlocked for editing yet."); return; case OT_DROPPEDITEM: - c->Message(0, "ERROR: Object %u is a temporarily spawned ground spawn or dropped item, " + c->Message(Chat::White, "ERROR: Object %u is a temporarily spawned ground spawn or dropped item, " "which cannot be manipulated with #object. See the 'ground_spawns' table " "in the database.", id); return; case staticType: - c->Message(0, "ERROR: Object %u has been unlocked for editing, but you must zone out " + c->Message(Chat::White, "ERROR: Object %u has been unlocked for editing, but you must zone out " "and back in for your client to refresh its object table before you can " "make changes to it.", id); @@ -10087,7 +10087,7 @@ void command_object(Client *c, const Seperator *sep) default: // Unknown error preventing us from seeing the object in the zone. - c->Message(0, "ERROR: Unknown problem attempting to manipulate object %u", id); + c->Message(Chat::White, "ERROR: Unknown problem attempting to manipulate object %u", id); return; } } @@ -10104,7 +10104,7 @@ void command_object(Client *c, const Seperator *sep) if (strcmp(sep->arg[3], "model") == 0) { if ((sep->arg[4][0] < 'A') || (sep->arg[4][0] > 'Z')) { - c->Message(0, "ERROR: Model names must begin with a letter."); + c->Message(Chat::White, "ERROR: Model names must begin with a letter."); return; } @@ -10112,10 +10112,10 @@ void command_object(Client *c, const Seperator *sep) o->SetObjectData(&od); - c->Message(0, "Object %u now being rendered with model '%s'", id, od.object_name); + c->Message(Chat::White, "Object %u now being rendered with model '%s'", id, od.object_name); } else if (strcmp(sep->arg[3], "type") == 0) { if ((sep->arg[4][0] < '0') || (sep->arg[4][0] > '9')) { - c->Message(0, "ERROR: Invalid type number"); + c->Message(Chat::White, "ERROR: Invalid type number"); return; } @@ -10125,20 +10125,20 @@ void command_object(Client *c, const Seperator *sep) case 0: // Convert Static Object to temporary changeable type od.object_type = staticType; - c->Message(0, "Note: Static Object will still act like tradeskill object and will not " + c->Message(Chat::White, "Note: Static Object will still act like tradeskill object and will not " "reflect size, solidtype, or incline settings until committed to the " "database with '#object Save', after which it will be unchangeable until " "it is unlocked again with '#object Edit'."); break; case OT_DROPPEDITEM: - c->Message(0, "ERROR: Object Type 1 is used for temporarily spawned ground spawns and " + c->Message(Chat::White, "ERROR: Object Type 1 is used for temporarily spawned ground spawns and " "dropped items, which are not supported with #object. See the " "'ground_spawns' table in the database."); return; default: - c->Message(0, "Object %u changed to Tradeskill Object Type %u", id, od.object_type); + c->Message(Chat::White, "Object %u changed to Tradeskill Object Type %u", id, od.object_type); break; } @@ -10152,7 +10152,7 @@ void command_object(Client *c, const Seperator *sep) } if ((sep->arg[4][0] < '0') || (sep->arg[4][0] > '9')) { - c->Message(0, "ERROR: Invalid size specified. Please enter a number."); + c->Message(Chat::White, "ERROR: Invalid size specified. Please enter a number."); return; } @@ -10162,47 +10162,47 @@ void command_object(Client *c, const Seperator *sep) if (od.size == 0) // 0 == unspecified == 100% od.size = 100; - c->Message(0, "Static Object %u set to %u%% size. Size will take effect when you commit to the " + c->Message(Chat::White, "Static Object %u set to %u%% size. Size will take effect when you commit to the " "database with '#object Save', after which the object will be unchangeable until " "you unlock it again with '#object Edit' and zone out and back in.", id, od.size); } else if (strcmp(sep->arg[3], "solidtype") == 0) { if (od.object_type != staticType) { - c->Message(0, "ERROR: Object %u is not a Static Object and does not support the " + c->Message(Chat::White, "ERROR: Object %u is not a Static Object and does not support the " "SolidType property", id); return; } if ((sep->arg[4][0] < '0') || (sep->arg[4][0] > '9')) { - c->Message(0, "ERROR: Invalid solidtype specified. Please enter a number."); + c->Message(Chat::White, "ERROR: Invalid solidtype specified. Please enter a number."); return; } od.solidtype = atoi(sep->arg[4]); o->SetObjectData(&od); - c->Message(0, "Static Object %u set to SolidType %u. Change will take effect when you commit " + c->Message(Chat::White, "Static Object %u set to SolidType %u. Change will take effect when you commit " "to the database with '#object Save'. Support for this property is on a " "per-model basis, mostly seen in smaller objects such as chests and tables.", id, od.solidtype); } else if (strcmp(sep->arg[3], "icon") == 0) { if ((od.object_type < 2) || (od.object_type == staticType)) { - c->Message(0, "ERROR: Object %u is not a Tradeskill Object and does not support the " + c->Message(Chat::White, "ERROR: Object %u is not a Tradeskill Object and does not support the " "Icon property", id); return; } if ((icon = atoi(sep->arg[4])) == 0) { - c->Message(0, "ERROR: Invalid Icon specified. Please enter an icon number."); + c->Message(Chat::White, "ERROR: Invalid Icon specified. Please enter an icon number."); return; } o->SetIcon(icon); - c->Message(0, "Tradeskill Object %u icon set to %u", id, icon); + c->Message(Chat::White, "Tradeskill Object %u icon set to %u", id, icon); } else if (strcmp(sep->arg[3], "incline") == 0) { if (od.object_type != staticType) { c->Message( @@ -10222,12 +10222,12 @@ void command_object(Client *c, const Seperator *sep) od.unknown020 = atoi(sep->arg[4]); o->SetObjectData(&od); - c->Message(0, "Static Object %u set to %u incline. Incline will take effect when you commit to " + c->Message(Chat::White, "Static Object %u set to %u incline. Incline will take effect when you commit to " "the database with '#object Save', after which the object will be unchangeable " "until you unlock it again with '#object Edit' and zone out and back in.", id, od.unknown020); } else { - c->Message(0, "ERROR: Unrecognized property name: %s", sep->arg[3]); + c->Message(Chat::White, "ERROR: Unrecognized property name: %s", sep->arg[3]); return; } @@ -10250,7 +10250,7 @@ void command_object(Client *c, const Seperator *sep) ((id = atoi(sep->arg[2])) == 0) || // ID not specified (((sep->arg[3][0] < '0') || (sep->arg[3][0] > '9')) && ((sep->arg[3][0] & 0xDF) != 'T') && (sep->arg[3][0] != '-') && (sep->arg[3][0] != '.'))) { // Location argument not specified correctly - c->Message(0, "Usage: #object Move (ObjectID) ToMe|(x y z [h])"); + c->Message(Chat::White, "Usage: #object Move (ObjectID) ToMe|(x y z [h])"); return; } @@ -10258,7 +10258,7 @@ void command_object(Client *c, const Seperator *sep) std::string query = StringFormat("SELECT zoneid, version, type FROM object WHERE id = %u", id); auto results = database.QueryDatabase(query); if (!results.Success() || results.RowCount() == 0) { - c->Message(0, "ERROR: Object %u not found", id); + c->Message(Chat::White, "ERROR: Object %u not found", id); return; } @@ -10268,38 +10268,38 @@ void command_object(Client *c, const Seperator *sep) od.object_type = atoi(row[2]); if (od.zone_id != zone->GetZoneID()) { - c->Message(0, "ERROR: Object %u is not in this zone", id); + c->Message(Chat::White, "ERROR: Object %u is not in this zone", id); return; } if (od.zone_instance != zone->GetInstanceVersion()) { - c->Message(0, "ERROR: Object %u is not in this instance version", id); + c->Message(Chat::White, "ERROR: Object %u is not in this instance version", id); return; } switch (od.object_type) { case 0: - c->Message(0, "ERROR: Object %u is not yet unlocked for editing. Use '#object Edit' " + c->Message(Chat::White, "ERROR: Object %u is not yet unlocked for editing. Use '#object Edit' " "then zone out and back in to move it.", id); return; case staticType: - c->Message(0, "ERROR: Object %u has been unlocked for editing, but you must zone out " + c->Message(Chat::White, "ERROR: Object %u has been unlocked for editing, but you must zone out " "and back in before your client sees the change and will allow you to " "move it.", id); return; case 1: - c->Message(0, "ERROR: Object %u is a temporary spawned object and cannot be " + c->Message(Chat::White, "ERROR: Object %u is a temporary spawned object and cannot be " "manipulated with #object. See the 'ground_spawns' table in the " "database.", id); return; default: - c->Message(0, "ERROR: Object %u not located in zone.", id); + c->Message(Chat::White, "ERROR: Object %u not located in zone.", id); return; } } @@ -10354,12 +10354,12 @@ void command_object(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "rotate") == 0) { // Insufficient or invalid arguments if ((sep->argnum < 3) || ((id = atoi(sep->arg[2])) == 0)) { - c->Message(0, "Usage: #object Rotate (ObjectID) (Heading, 0-512)"); + c->Message(Chat::White, "Usage: #object Rotate (ObjectID) (Heading, 0-512)"); return; } if ((o = entity_list.FindObject(id)) == nullptr) { - c->Message(0, "ERROR: Object %u not found in zone, or is a static object not yet unlocked with " + c->Message(Chat::White, "ERROR: Object %u not found in zone, or is a static object not yet unlocked with " "'#object Edit' for editing.", id); return; @@ -10383,7 +10383,7 @@ void command_object(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "save") == 0) { // Insufficient or invalid arguments if ((sep->argnum < 2) || ((id = atoi(sep->arg[2])) == 0)) { - c->Message(0, "Usage: #object Save (ObjectID)"); + c->Message(Chat::White, "Usage: #object Save (ObjectID)"); return; } @@ -10411,36 +10411,36 @@ void command_object(Client *c, const Seperator *sep) // Object not found in zone. Can't save an object we can't see. if (bNewObject) { - c->Message(0, "ERROR: Object %u not found", id); + c->Message(Chat::White, "ERROR: Object %u not found", id); return; } if (od.zone_id != zone->GetZoneID()) { - c->Message(0, "ERROR: Wrong Object ID. %u is not part of this zone.", id); + c->Message(Chat::White, "ERROR: Wrong Object ID. %u is not part of this zone.", id); return; } if (od.zone_instance != zone->GetInstanceVersion()) { - c->Message(0, "ERROR: Wrong Object ID. %u is not part of this instance version.", id); + c->Message(Chat::White, "ERROR: Wrong Object ID. %u is not part of this instance version.", id); return; } if (od.object_type == 0) { - c->Message(0, "ERROR: Static Object %u has already been committed. Use '#object Edit " + c->Message(Chat::White, "ERROR: Static Object %u has already been committed. Use '#object Edit " "%u' and zone out and back in to make changes.", id, id); return; } if (od.object_type == 1) { - c->Message(0, "ERROR: Object %u is a temporarily spawned ground spawn or dropped item, " + c->Message(Chat::White, "ERROR: Object %u is a temporarily spawned ground spawn or dropped item, " "which is not supported with #object. See the 'ground_spawns' table in " "the database.", id); return; } - c->Message(0, "ERROR: Object %u not found.", id); + c->Message(Chat::White, "ERROR: Object %u not found.", id); return; } @@ -10493,28 +10493,28 @@ void command_object(Client *c, const Seperator *sep) results = database.QueryDatabase(query); if (!results.Success()) { - c->Message(0, "Database Error: %s", results.ErrorMessage().c_str()); + c->Message(Chat::White, "Database Error: %s", results.ErrorMessage().c_str()); return; } if (results.RowsAffected() == 0) { // No change made, but no error message given - c->Message(0, "Database Error: Could not save change to Object %u", id); + c->Message(Chat::White, "Database Error: Could not save change to Object %u", id); return; } if (bNewObject) { if (newid == results.LastInsertedID()) { - c->Message(0, "Saved new Object %u to database", id); + c->Message(Chat::White, "Saved new Object %u to database", id); return; } - c->Message(0, "Saved Object. NOTE: Database returned a new ID number for object: %u", newid); + c->Message(Chat::White, "Saved Object. NOTE: Database returned a new ID number for object: %u", newid); id = newid; return; } - c->Message(0, "Saved changes to Object %u", id); + c->Message(Chat::White, "Saved changes to Object %u", id); newid = id; if (od.object_type == 0) { @@ -10588,7 +10588,7 @@ void command_object(Client *c, const Seperator *sep) entity_list.QueueClients(0, app); safe_delete(app); - c->Message(0, "NOTE: Object %u is now a static object, and is unchangeable. To make future " + c->Message(Chat::White, "NOTE: Object %u is now a static object, and is unchangeable. To make future " "changes, use '#object Edit' to convert it to a changeable form, then zone out " "and back in.", id); @@ -10600,15 +10600,15 @@ void command_object(Client *c, const Seperator *sep) // Insufficient or invalid arguments if ((sep->argnum < 3) || (((sep->arg[2][0] & 0xDF) != 'A') && ((sep->arg[2][0] < '0') || (sep->arg[2][0] > '9')))) { - c->Message(0, "Usage: #object Copy All|(ObjectID) (InstanceVersion)"); - c->Message(0, "- Note: Only objects saved in the database can be copied to another instance."); + c->Message(Chat::White, "Usage: #object Copy All|(ObjectID) (InstanceVersion)"); + c->Message(Chat::White, "- Note: Only objects saved in the database can be copied to another instance."); return; } od.zone_instance = atoi(sep->arg[3]); if (od.zone_instance == zone->GetInstanceVersion()) { - c->Message(0, "ERROR: Source and destination instance versions are the same."); + c->Message(Chat::White, "ERROR: Source and destination instance versions are the same."); return; } @@ -10625,11 +10625,11 @@ void command_object(Client *c, const Seperator *sep) od.zone_instance, zone->GetZoneID(), zone->GetInstanceVersion()); auto results = database.QueryDatabase(query); if (!results.Success()) { - c->Message(0, "Database Error: %s", results.ErrorMessage().c_str()); + c->Message(Chat::White, "Database Error: %s", results.ErrorMessage().c_str()); return; } - c->Message(0, "Copied %u object%s into instance version %u", results.RowCount(), + c->Message(Chat::White, "Copied %u object%s into instance version %u", results.RowCount(), (results.RowCount() == 1) ? "" : "s", od.zone_instance); return; } @@ -10645,7 +10645,7 @@ void command_object(Client *c, const Seperator *sep) od.zone_instance, id, zone->GetZoneID(), zone->GetInstanceVersion()); auto results = database.QueryDatabase(query); if (results.Success() && results.RowsAffected() > 0) { - c->Message(0, "Copied Object %u into instance version %u", id, od.zone_instance); + c->Message(Chat::White, "Copied Object %u into instance version %u", id, od.zone_instance); return; } @@ -10653,7 +10653,7 @@ void command_object(Client *c, const Seperator *sep) // got an error message if (!results.Success()) { - c->Message(0, "Database Error: %s", results.ErrorMessage().c_str()); + c->Message(Chat::White, "Database Error: %s", results.ErrorMessage().c_str()); return; } @@ -10665,25 +10665,25 @@ void command_object(Client *c, const Seperator *sep) return; if (results.RowCount() == 0) { - c->Message(0, "ERROR: Object %u not found", id); + c->Message(Chat::White, "ERROR: Object %u not found", id); return; } auto row = results.begin(); // Wrong ZoneID? if (atoi(row[0]) != zone->GetZoneID()) { - c->Message(0, "ERROR: Object %u is not part of this zone.", id); + c->Message(Chat::White, "ERROR: Object %u is not part of this zone.", id); return; } // Wrong Instance Version? if (atoi(row[1]) != zone->GetInstanceVersion()) { - c->Message(0, "ERROR: Object %u is not part of this instance version.", id); + c->Message(Chat::White, "ERROR: Object %u is not part of this instance version.", id); return; } // Well, NO clue at this point. Just let 'em know something screwed up. - c->Message(0, "ERROR: Unknown database error copying Object %u to instance version %u", id, + c->Message(Chat::White, "ERROR: Unknown database error copying Object %u to instance version %u", id, od.zone_instance); return; } @@ -10691,7 +10691,7 @@ void command_object(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "delete") == 0) { if ((sep->argnum < 2) || ((id = atoi(sep->arg[2])) <= 0)) { - c->Message(0, "Usage: #object Delete (ObjectID) -- NOTE: Object deletions are permanent and " + c->Message(Chat::White, "Usage: #object Delete (ObjectID) -- NOTE: Object deletions are permanent and " "cannot be undone!"); return; } @@ -10715,7 +10715,7 @@ void command_object(Client *c, const Seperator *sep) id, zone->GetZoneID(), zone->GetInstanceVersion()); auto results = database.QueryDatabase(query); - c->Message(0, "Object %u deleted", id); + c->Message(Chat::White, "Object %u deleted", id); return; } @@ -10729,7 +10729,7 @@ void command_object(Client *c, const Seperator *sep) return; if (results.RowCount() == 0) { - c->Message(0, "ERROR: Object %u not found in this zone or instance!", id); + c->Message(Chat::White, "ERROR: Object %u not found in this zone or instance!", id); return; } @@ -10742,13 +10742,13 @@ void command_object(Client *c, const Seperator *sep) id, zone->GetZoneID(), zone->GetInstanceVersion()); results = database.QueryDatabase(query); - c->Message(0, "Object %u deleted. NOTE: This static object will remain for anyone currently in " + c->Message(Chat::White, "Object %u deleted. NOTE: This static object will remain for anyone currently in " "the zone until they next zone out and in.", id); return; case 1: // Temporary Spawn - c->Message(0, "ERROR: Object %u is a temporarily spawned ground spawn or dropped item, which " + c->Message(Chat::White, "ERROR: Object %u is a temporarily spawned ground spawn or dropped item, which " "is not supported with #object. See the 'ground_spawns' table in the database.", id); return; @@ -10760,7 +10760,7 @@ void command_object(Client *c, const Seperator *sep) if (strcasecmp(sep->arg[1], "undo") == 0) { // Insufficient or invalid arguments if ((sep->argnum < 2) || ((id = atoi(sep->arg[2])) == 0)) { - c->Message(0, "Usage: #object Undo (ObjectID) -- Reload object from database, undoing any " + c->Message(Chat::White, "Usage: #object Undo (ObjectID) -- Reload object from database, undoing any " "changes you have made"); return; } @@ -10768,13 +10768,13 @@ void command_object(Client *c, const Seperator *sep) o = entity_list.FindObject(id); if (!o) { - c->Message(0, "ERROR: Object %u not found in zone in a manipulable form. No changes to undo.", + c->Message(Chat::White, "ERROR: Object %u not found in zone in a manipulable form. No changes to undo.", id); return; } if (o->GetType() == OT_DROPPEDITEM) { - c->Message(0, "ERROR: Object %u is a temporary spawned item and cannot be manipulated with " + c->Message(Chat::White, "ERROR: Object %u is a temporary spawned item and cannot be manipulated with " "#object. See the 'ground_spawns' table in the database.", id); return; @@ -10794,7 +10794,7 @@ void command_object(Client *c, const Seperator *sep) id); auto results = database.QueryDatabase(query); if (!results.Success() || results.RowCount() == 0) { - c->Message(0, "Database Error: %s", results.ErrorMessage().c_str()); + c->Message(Chat::White, "Database Error: %s", results.ErrorMessage().c_str()); return; } @@ -10819,11 +10819,11 @@ void command_object(Client *c, const Seperator *sep) o = new Object(id, od.object_type, icon, od, nullptr); entity_list.AddObject(o, true); - c->Message(0, "Object %u reloaded from database.", id); + c->Message(Chat::White, "Object %u reloaded from database.", id); return; } - c->Message(0, usage_string); + c->Message(Chat::White, usage_string); } void command_showspellslist(Client *c, const Seperator *sep) @@ -10831,12 +10831,12 @@ void command_showspellslist(Client *c, const Seperator *sep) Mob *target = c->GetTarget(); if (!target) { - c->Message(0, "Must target an NPC."); + c->Message(Chat::White, "Must target an NPC."); return; } if (!target->IsNPC()) { - c->Message(0, "%s is not an NPC.", target->GetName()); + c->Message(Chat::White, "%s is not an NPC.", target->GetName()); return; } @@ -10848,7 +10848,7 @@ void command_showspellslist(Client *c, const Seperator *sep) void command_raidloot(Client *c, const Seperator *sep) { if(!sep->arg[1][0]) { - c->Message(0, "Usage: #raidloot [LEADER/GROUPLEADER/SELECTED/ALL]"); + c->Message(Chat::White, "Usage: #raidloot [LEADER/GROUPLEADER/SELECTED/ALL]"); return; } @@ -10861,7 +10861,7 @@ void command_raidloot(Client *c, const Seperator *sep) { if(r->members[x].IsRaidLeader == 0) { - c->Message(0, "You must be the raid leader to use this command."); + c->Message(Chat::White, "You must be the raid leader to use this command."); } else { @@ -10892,12 +10892,12 @@ void command_raidloot(Client *c, const Seperator *sep) } else { - c->Message(0, "Usage: #raidloot [LEADER/GROUPLEADER/SELECTED/ALL]"); + c->Message(Chat::White, "Usage: #raidloot [LEADER/GROUPLEADER/SELECTED/ALL]"); } } else { - c->Message(0, "You must be in a raid to use that command."); + c->Message(Chat::White, "You must be in a raid to use that command."); } } @@ -10905,7 +10905,7 @@ void command_emoteview(Client *c, const Seperator *sep) { if(!c->GetTarget() || !c->GetTarget()->IsNPC()) { - c->Message(0, "You must target a NPC to view their emotes."); + c->Message(Chat::White, "You must target a NPC to view their emotes."); return; } @@ -10921,22 +10921,22 @@ void command_emoteview(Client *c, const Seperator *sep) NPC_Emote_Struct* nes = iterator.GetData(); if(emoteid == nes->emoteid) { - c->Message(0, "EmoteID: %i Event: %i Type: %i Text: %s", nes->emoteid, nes->event_, nes->type, nes->text); + c->Message(Chat::White, "EmoteID: %i Event: %i Type: %i Text: %s", nes->emoteid, nes->event_, nes->type, nes->text); count++; } iterator.Advance(); } if (count == 0) - c->Message(0, "No emotes found."); + c->Message(Chat::White, "No emotes found."); else - c->Message(0, "%i emote(s) found", count); + c->Message(Chat::White, "%i emote(s) found", count); } } void command_emotesearch(Client *c, const Seperator *sep) { if (sep->arg[1][0] == 0) - c->Message(0, "Usage: #emotesearch [search string or emoteid]"); + c->Message(Chat::White, "Usage: #emotesearch [search string or emoteid]"); else { const char *search_criteria=sep->argplus[1]; @@ -10952,15 +10952,15 @@ void command_emotesearch(Client *c, const Seperator *sep) NPC_Emote_Struct* nes = iterator.GetData(); if(emoteid == nes->emoteid) { - c->Message(0, "EmoteID: %i Event: %i Type: %i Text: %s", nes->emoteid, nes->event_, nes->type, nes->text); + c->Message(Chat::White, "EmoteID: %i Event: %i Type: %i Text: %s", nes->emoteid, nes->event_, nes->type, nes->text); count++; } iterator.Advance(); } if (count == 0) - c->Message(0, "No emotes found."); + c->Message(Chat::White, "No emotes found."); else - c->Message(0, "%i emote(s) found", count); + c->Message(Chat::White, "%i emote(s) found", count); } else { @@ -10980,7 +10980,7 @@ void command_emotesearch(Client *c, const Seperator *sep) pdest = strstr(sText, sCriteria); if (pdest != nullptr) { - c->Message(0, "EmoteID: %i Event: %i Type: %i Text: %s", nes->emoteid, nes->event_, nes->type, nes->text); + c->Message(Chat::White, "EmoteID: %i Event: %i Type: %i Text: %s", nes->emoteid, nes->event_, nes->type, nes->text); count++; } if (count == 50) @@ -10989,9 +10989,9 @@ void command_emotesearch(Client *c, const Seperator *sep) iterator.Advance(); } if (count == 50) - c->Message(0, "50 emotes shown...too many results."); + c->Message(Chat::White, "50 emotes shown...too many results."); else - c->Message(0, "%i emote(s) found", count); + c->Message(Chat::White, "%i emote(s) found", count); } } } @@ -11000,7 +11000,7 @@ void command_reloademote(Client *c, const Seperator *sep) { zone->NPCEmoteList.Clear(); zone->LoadNPCEmotes(&zone->NPCEmoteList); - c->Message(0, "NPC emotes reloaded."); + c->Message(Chat::White, "NPC emotes reloaded."); } void command_globalview(Client *c, const Seperator *sep) @@ -11044,14 +11044,14 @@ void command_globalview(Client *c, const Seperator *sep) auto iter = globalMap.begin(); uint32 gcount = 0; - c->Message(0, "Name, Value"); + c->Message(Chat::White, "Name, Value"); while(iter != globalMap.end()) { - c->Message(0, "%s %s", (*iter).name.c_str(), (*iter).value.c_str()); + c->Message(Chat::White, "%s %s", (*iter).name.c_str(), (*iter).value.c_str()); ++iter; ++gcount; } - c->Message(0, "%u globals loaded.", gcount); + c->Message(Chat::White, "%u globals loaded.", gcount); } else { @@ -11077,14 +11077,14 @@ void command_globalview(Client *c, const Seperator *sep) auto iter = globalMap.begin(); uint32 gcount = 0; - c->Message(0, "Name, Value"); + c->Message(Chat::White, "Name, Value"); while(iter != globalMap.end()) { - c->Message(0, "%s %s", (*iter).name.c_str(), (*iter).value.c_str()); + c->Message(Chat::White, "%s %s", (*iter).name.c_str(), (*iter).value.c_str()); ++iter; ++gcount; } - c->Message(0, "%u globals loaded.", gcount); + c->Message(Chat::White, "%u globals loaded.", gcount); } } @@ -11092,7 +11092,7 @@ void command_distance(Client *c, const Seperator *sep) { if(c && c->GetTarget()) { Mob* target = c->GetTarget(); - c->Message(0, "Your target, %s, is %1.1f units from you.", c->GetTarget()->GetName(), Distance(c->GetPosition(), target->GetPosition())); + c->Message(Chat::White, "Your target, %s, is %1.1f units from you.", c->GetTarget()->GetName(), Distance(c->GetPosition(), target->GetPosition())); } } @@ -11136,24 +11136,24 @@ void command_max_all_skills(Client *c, const Seperator *sep) void command_showbonusstats(Client *c, const Seperator *sep) { if (c->GetTarget() == 0) - c->Message(0, "ERROR: No target!"); + c->Message(Chat::White, "ERROR: No target!"); else if (!c->GetTarget()->IsMob() && !c->GetTarget()->IsClient()) - c->Message(0, "ERROR: Target is not a Mob or Player!"); + c->Message(Chat::White, "ERROR: Target is not a Mob or Player!"); else { bool bAll = false; if(sep->arg[1][0] == '\0' || strcasecmp(sep->arg[1], "all") == 0) bAll = true; if (bAll || (strcasecmp(sep->arg[1], "item")==0)) { - c->Message(0, "Target Item Bonuses:"); - c->Message(0, " Accuracy: %i%% Divine Save: %i%%", c->GetTarget()->GetItemBonuses().Accuracy, c->GetTarget()->GetItemBonuses().DivineSaveChance); - c->Message(0, " Flurry: %i%% HitChance: %i%%", c->GetTarget()->GetItemBonuses().FlurryChance, c->GetTarget()->GetItemBonuses().HitChance / 15); + c->Message(Chat::White, "Target Item Bonuses:"); + c->Message(Chat::White, " Accuracy: %i%% Divine Save: %i%%", c->GetTarget()->GetItemBonuses().Accuracy, c->GetTarget()->GetItemBonuses().DivineSaveChance); + c->Message(Chat::White, " Flurry: %i%% HitChance: %i%%", c->GetTarget()->GetItemBonuses().FlurryChance, c->GetTarget()->GetItemBonuses().HitChance / 15); } if (bAll || (strcasecmp(sep->arg[1], "spell")==0)) { - c->Message(0, " Target Spell Bonuses:"); - c->Message(0, " Accuracy: %i%% Divine Save: %i%%", c->GetTarget()->GetSpellBonuses().Accuracy, c->GetTarget()->GetSpellBonuses().DivineSaveChance); - c->Message(0, " Flurry: %i%% HitChance: %i%% ", c->GetTarget()->GetSpellBonuses().FlurryChance, c->GetTarget()->GetSpellBonuses().HitChance / 15); + c->Message(Chat::White, " Target Spell Bonuses:"); + c->Message(Chat::White, " Accuracy: %i%% Divine Save: %i%%", c->GetTarget()->GetSpellBonuses().Accuracy, c->GetTarget()->GetSpellBonuses().DivineSaveChance); + c->Message(Chat::White, " Flurry: %i%% HitChance: %i%% ", c->GetTarget()->GetSpellBonuses().FlurryChance, c->GetTarget()->GetSpellBonuses().HitChance / 15); } - c->Message(0, " Effective Casting Level: %i", c->GetTarget()->GetCasterLevel(0)); + c->Message(Chat::White, " Effective Casting Level: %i", c->GetTarget()->GetCasterLevel(0)); } } @@ -11332,27 +11332,27 @@ void command_profanity(Client *c, const Seperator *sep) return; } - c->Message(0, "Usage: #profanity [list] - shows profanity list"); - c->Message(0, "Usage: #profanity [clear] - deletes all entries"); - c->Message(0, "Usage: #profanity [add] [] - adds entry"); - c->Message(0, "Usage: #profanity [del] [] - deletes entry"); - c->Message(0, "Usage: #profanity [reload] - reloads profanity list"); + c->Message(Chat::White, "Usage: #profanity [list] - shows profanity list"); + c->Message(Chat::White, "Usage: #profanity [clear] - deletes all entries"); + c->Message(Chat::White, "Usage: #profanity [add] [] - adds entry"); + c->Message(Chat::White, "Usage: #profanity [del] [] - deletes entry"); + c->Message(Chat::White, "Usage: #profanity [reload] - reloads profanity list"); } void command_mysql(Client *c, const Seperator *sep) { if(!sep->arg[1][0] || !sep->arg[2][0]) { - c->Message(0, "Usage: #mysql query \"Query here\""); + c->Message(Chat::White, "Usage: #mysql query \"Query here\""); return; } if (strcasecmp(sep->arg[1], "help") == 0) { - c->Message(0, "MYSQL In-Game CLI Interface:"); - c->Message(0, "Example: #mysql query \"Query goes here quoted\" -s -h"); - c->Message(0, "To use 'like \"%%something%%\" replace the %% with #"); - c->Message(0, "Example: #mysql query \"select * from table where name like \"#something#\""); - c->Message(0, "-s - Spaces select entries apart"); - c->Message(0, "-h - Colors every other select result"); + c->Message(Chat::White, "MYSQL In-Game CLI Interface:"); + c->Message(Chat::White, "Example: #mysql query \"Query goes here quoted\" -s -h"); + c->Message(Chat::White, "To use 'like \"%%something%%\" replace the %% with #"); + c->Message(Chat::White, "Example: #mysql query \"select * from table where name like \"#something#\""); + c->Message(Chat::White, "-s - Spaces select entries apart"); + c->Message(Chat::White, "-h - Colors every other select result"); return; } @@ -11408,7 +11408,7 @@ void command_mysql(Client *c, const Seperator *sep) lineVec.push_back(lineText.str()); if(optionS) //This provides spacing for the space switch - c->Message(0, " "); + c->Message(Chat::White, " "); if(optionH) //This option will highlight every other row highlightTextIndex = 1 - highlightTextIndex; @@ -11437,7 +11437,7 @@ void command_xtargets(Client *c, const Seperator *sep) return; } t->SetMaxXTargets(NewMax); - c->Message(0, "Max number of XTargets set to %i", NewMax); + c->Message(Chat::White, "Max number of XTargets set to %i", NewMax); } else t->ShowXTargets(c); @@ -11448,11 +11448,11 @@ void command_zopp(Client *c, const Seperator *sep) if (!c) return; else if (sep->argnum < 3 || sep->argnum > 4) - c->Message(0, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]"); + c->Message(Chat::White, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]"); else if (!strcasecmp(sep->arg[1], "trade") == 0 && !strcasecmp(sep->arg[1], "t") == 0 && !strcasecmp(sep->arg[1], "summon") == 0 && !strcasecmp(sep->arg[1], "s") == 0) - c->Message(0, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]"); + c->Message(Chat::White, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]"); else if (!sep->IsNumber(2) || !sep->IsNumber(3) || (sep->argnum == 4 && !sep->IsNumber(4))) - c->Message(0, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]"); + c->Message(Chat::White, "Usage: #zopp [trade/summon] [slot id] [item id] [*charges]"); else { ItemPacketType packettype; @@ -11486,12 +11486,12 @@ void command_zopp(Client *c, const Seperator *sep) if (charges < 0 || charges > FakeItem->StackSize) { c->Message(Chat::Red, "Warning: The specified charge count does not meet expected criteria!"); - c->Message(0, "Processing request..results may cause unpredictable behavior."); + c->Message(Chat::White, "Processing request..results may cause unpredictable behavior."); } EQEmu::ItemInstance* FakeItemInst = database.CreateItem(FakeItem, charges); c->SendItemPacket(slotid, FakeItemInst, packettype); - c->Message(0, "Sending zephyr op packet to client - [%s] %s (%u) with %i %s to slot %i.", + c->Message(Chat::White, "Sending zephyr op packet to client - [%s] %s (%u) with %i %s to slot %i.", packettype == ItemPacketTrade ? "Trade" : "Summon", FakeItem->Name, itemid, charges, std::abs(charges == 1) ? "charge" : "charges", slotid); safe_delete(FakeItemInst); @@ -11515,17 +11515,17 @@ void command_questerrors(Client *c, const Seperator *sep) { std::list err; parse->GetErrors(err); - c->Message(0, "Current Quest Errors:"); + c->Message(Chat::White, "Current Quest Errors:"); auto iter = err.begin(); int i = 0; while(iter != err.end()) { if(i >= 30) { - c->Message(0, "Maximum of 30 Errors shown..."); + c->Message(Chat::White, "Maximum of 30 Errors shown..."); break; } - c->Message(0, iter->c_str()); + c->Message(Chat::White, iter->c_str()); ++i; ++iter; } @@ -11540,20 +11540,20 @@ void command_enablerecipe(Client *c, const Seperator *sep) recipe_id = atoi(sep->arg[1]); } else { - c->Message(0, "Invalid number of arguments.\nUsage: #enablerecipe recipe_id"); + c->Message(Chat::White, "Invalid number of arguments.\nUsage: #enablerecipe recipe_id"); return; } if (recipe_id > 0) { success = database.EnableRecipe(recipe_id); if (success) { - c->Message(0, "Recipe enabled."); + c->Message(Chat::White, "Recipe enabled."); } else { - c->Message(0, "Recipe not enabled."); + c->Message(Chat::White, "Recipe not enabled."); } } else { - c->Message(0, "Invalid recipe id.\nUsage: #enablerecipe recipe_id"); + c->Message(Chat::White, "Invalid recipe id.\nUsage: #enablerecipe recipe_id"); } } } @@ -11567,20 +11567,20 @@ void command_disablerecipe(Client *c, const Seperator *sep) recipe_id = atoi(sep->arg[1]); } else { - c->Message(0, "Invalid number of arguments.\nUsage: #disablerecipe recipe_id"); + c->Message(Chat::White, "Invalid number of arguments.\nUsage: #disablerecipe recipe_id"); return; } if (recipe_id > 0) { success = database.DisableRecipe(recipe_id); if (success) { - c->Message(0, "Recipe disabled."); + c->Message(Chat::White, "Recipe disabled."); } else { - c->Message(0, "Recipe not disabled."); + c->Message(Chat::White, "Recipe not disabled."); } } else { - c->Message(0, "Invalid recipe id.\nUsage: #disablerecipe recipe_id"); + c->Message(Chat::White, "Invalid recipe id.\nUsage: #disablerecipe recipe_id"); } } } @@ -11590,13 +11590,13 @@ void command_npctype_cache(Client *c, const Seperator *sep) if (sep->argnum > 0) { for (int i = 0; i < sep->argnum; ++i) { if (strcasecmp(sep->arg[i + 1], "all") == 0) { - c->Message(0, "Clearing all npc types from the cache."); + c->Message(Chat::White, "Clearing all npc types from the cache."); zone->ClearNPCTypeCache(-1); } else { int id = atoi(sep->arg[i + 1]); if (id > 0) { - c->Message(0, "Clearing npc type %d from the cache.", id); + c->Message(Chat::White, "Clearing npc type %d from the cache.", id); zone->ClearNPCTypeCache(id); return; } @@ -11604,9 +11604,9 @@ void command_npctype_cache(Client *c, const Seperator *sep) } } else { - c->Message(0, "Usage:"); - c->Message(0, "#npctype_cache [npctype_id] ..."); - c->Message(0, "#npctype_cache all"); + c->Message(Chat::White, "Usage:"); + c->Message(Chat::White, "#npctype_cache [npctype_id] ..."); + c->Message(Chat::White, "#npctype_cache all"); } } @@ -11614,7 +11614,7 @@ void command_merchantopenshop(Client *c, const Seperator *sep) { Mob *merchant = c->GetTarget(); if (!merchant || merchant->GetClass() != MERCHANT) { - c->Message(0, "You must target a merchant to open their shop."); + c->Message(Chat::White, "You must target a merchant to open their shop."); return; } @@ -11625,7 +11625,7 @@ void command_merchantcloseshop(Client *c, const Seperator *sep) { Mob *merchant = c->GetTarget(); if (!merchant || merchant->GetClass() != MERCHANT) { - c->Message(0, "You must target a merchant to close their shop."); + c->Message(Chat::White, "You must target a merchant to close their shop."); return; } @@ -11643,12 +11643,12 @@ void command_shownpcgloballoot(Client *c, const Seperator *sep) auto tar = c->GetTarget(); if (!tar || !tar->IsNPC()) { - c->Message(0, "You must target an NPC to use this command."); + c->Message(Chat::White, "You must target an NPC to use this command."); return; } auto npc = tar->CastToNPC(); - c->Message(0, "GlobalLoot for %s (%d)", npc->GetName(), npc->GetNPCTypeID()); + c->Message(Chat::White, "GlobalLoot for %s (%d)", npc->GetName(), npc->GetNPCTypeID()); zone->ShowNPCGlobalLoot(c, npc); } @@ -11657,33 +11657,33 @@ void command_tune(Client *c, const Seperator *sep) //Work in progress - Kayen if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) { - c->Message(0, "Syntax: #tune [subcommand]."); - c->Message(0, "-- Tune System Commands --"); - c->Message(0, "-- Usage: Returning recommended combat statistical values based on a desired outcome."); - c->Message(0, "-- Note: If targeted mob does not have a target (ie not engaged in combat), YOU will be considered the target."); - c->Message(0, "-- Warning: The calculations done in this process are intense and can potentially cause zone crashes depending on parameters set, use with caution!"); - c->Message(0, "-- Below are OPTIONAL parameters."); - c->Message(0, "-- Note: [interval] Determines how fast the stat being checked increases/decreases till it finds the best result. Default [ATK/AC 50][Acc/Avoid 10] "); - c->Message(0, "-- Note: [loop_max] Determines how many iterations are done to increases/decreases the stat till it finds the best result. Default [ATK/AC 100][Acc/Avoid 1000]"); - c->Message(0, "-- Note: [Stat Override] Will override that stat on mob being checkd with the specified value. Default=0"); - c->Message(0, "-- Note: [Info Level] How much statistical detail is displayed[0 - 3]. Default=0 "); - c->Message(0, "-- Note: Results are only approximations usually accurate to +/- 2 intervals."); + c->Message(Chat::White, "Syntax: #tune [subcommand]."); + c->Message(Chat::White, "-- Tune System Commands --"); + c->Message(Chat::White, "-- Usage: Returning recommended combat statistical values based on a desired outcome."); + c->Message(Chat::White, "-- Note: If targeted mob does not have a target (ie not engaged in combat), YOU will be considered the target."); + c->Message(Chat::White, "-- Warning: The calculations done in this process are intense and can potentially cause zone crashes depending on parameters set, use with caution!"); + c->Message(Chat::White, "-- Below are OPTIONAL parameters."); + c->Message(Chat::White, "-- Note: [interval] Determines how fast the stat being checked increases/decreases till it finds the best result. Default [ATK/AC 50][Acc/Avoid 10] "); + c->Message(Chat::White, "-- Note: [loop_max] Determines how many iterations are done to increases/decreases the stat till it finds the best result. Default [ATK/AC 100][Acc/Avoid 1000]"); + c->Message(Chat::White, "-- Note: [Stat Override] Will override that stat on mob being checkd with the specified value. Default=0"); + c->Message(Chat::White, "-- Note: [Info Level] How much statistical detail is displayed[0 - 3]. Default=0 "); + c->Message(Chat::White, "-- Note: Results are only approximations usually accurate to +/- 2 intervals."); - c->Message(0, "... "); - c->Message(0, "...### Category A ### Target = ATTACKER ### YOU or Target's Target = DEFENDER ###"); - c->Message(0, "...### Category B ### Target = DEFENDER ### YOU or Target's Target = ATTACKER ###"); - c->Message(0, "... "); - c->Message(0, "...#Returns recommended ATK adjustment +/- on ATTACKER that will result in an average mitigation pct on DEFENDER. "); - c->Message(0, "...tune FindATK [A/B] [pct mitigation] [interval][loop_max][AC Overwride][Info Level]"); - c->Message(0, "... "); - c->Message(0, "...#Returns recommended AC adjustment +/- on DEFENDER for an average mitigation pct from ATTACKER. "); - c->Message(0, "...tune FindAC [A/B] [pct mitigation] [interval][loop_max][ATK Overwride][Info Level] "); - c->Message(0, "... "); - c->Message(0, "...#Returns recommended Accuracy adjustment +/- on ATTACKER that will result in a hit chance pct on DEFENDER. "); - c->Message(0, "...tune FindAccuracy [A/B] [hit chance] [interval][loop_max][Avoidance Overwride][Info Level]"); - c->Message(0, "... "); - c->Message(0, "...#Returns recommended Avoidance adjustment +/- on DEFENDER for in a hit chance pct from ATTACKER. "); - c->Message(0, "...tune FindAvoidance [A/B] [pct mitigation] [interval][loop_max][Accuracy Overwride][Info Level] "); + c->Message(Chat::White, "... "); + c->Message(Chat::White, "...### Category A ### Target = ATTACKER ### YOU or Target's Target = DEFENDER ###"); + c->Message(Chat::White, "...### Category B ### Target = DEFENDER ### YOU or Target's Target = ATTACKER ###"); + c->Message(Chat::White, "... "); + c->Message(Chat::White, "...#Returns recommended ATK adjustment +/- on ATTACKER that will result in an average mitigation pct on DEFENDER. "); + c->Message(Chat::White, "...tune FindATK [A/B] [pct mitigation] [interval][loop_max][AC Overwride][Info Level]"); + c->Message(Chat::White, "... "); + c->Message(Chat::White, "...#Returns recommended AC adjustment +/- on DEFENDER for an average mitigation pct from ATTACKER. "); + c->Message(Chat::White, "...tune FindAC [A/B] [pct mitigation] [interval][loop_max][ATK Overwride][Info Level] "); + c->Message(Chat::White, "... "); + c->Message(Chat::White, "...#Returns recommended Accuracy adjustment +/- on ATTACKER that will result in a hit chance pct on DEFENDER. "); + c->Message(Chat::White, "...tune FindAccuracy [A/B] [hit chance] [interval][loop_max][Avoidance Overwride][Info Level]"); + c->Message(Chat::White, "... "); + c->Message(Chat::White, "...#Returns recommended Avoidance adjustment +/- on DEFENDER for in a hit chance pct from ATTACKER. "); + c->Message(Chat::White, "...tune FindAvoidance [A/B] [pct mitigation] [interval][loop_max][Accuracy Overwride][Info Level] "); return; } @@ -11693,7 +11693,7 @@ void command_tune(Client *c, const Seperator *sep) if (!attacker) { - c->Message(0, "#Tune - Error no target selected. [#Tune help]"); + c->Message(Chat::White, "#Tune - Error no target selected. [#Tune help]"); return; } @@ -11730,9 +11730,9 @@ void command_tune(Client *c, const Seperator *sep) else if(!strcasecmp(sep->arg[2], "B")) c->Tune_FindATKByPctMitigation(attacker,defender, pct_mitigation, interval, max_loop,ac_override,info_level); else { - c->Message(0, "#Tune - Error no category selcted. [#Tune help]"); - c->Message(0, "Usage #tune FindATK [A/B] [pct mitigation] [interval][loop_max][AC Overwride][Info Level] "); - c->Message(0, "Example #tune FindATK A 60"); + c->Message(Chat::White, "#Tune - Error no category selcted. [#Tune help]"); + c->Message(Chat::White, "Usage #tune FindATK [A/B] [pct mitigation] [interval][loop_max][AC Overwride][Info Level] "); + c->Message(Chat::White, "Example #tune FindATK A 60"); } return; } @@ -11765,9 +11765,9 @@ void command_tune(Client *c, const Seperator *sep) else if(!strcasecmp(sep->arg[2], "B")) c->Tune_FindACByPctMitigation(attacker, defender, pct_mitigation, interval, max_loop,atk_override,info_level); else { - c->Message(0, "#Tune - Error no category selcted. [#Tune help]"); - c->Message(0, "Usage #tune FindAC [A/B] [pct mitigation] [interval][loop_max][ATK Overwride][Info Level] "); - c->Message(0, "Example #tune FindAC A 60"); + c->Message(Chat::White, "#Tune - Error no category selcted. [#Tune help]"); + c->Message(Chat::White, "Usage #tune FindAC [A/B] [pct mitigation] [interval][loop_max][ATK Overwride][Info Level] "); + c->Message(Chat::White, "Example #tune FindAC A 60"); } return; @@ -11807,9 +11807,9 @@ void command_tune(Client *c, const Seperator *sep) else if(!strcasecmp(sep->arg[2], "B")) c->Tune_FindAccuaryByHitChance(attacker, defender, hit_chance, interval, max_loop,avoid_override,info_level); else { - c->Message(0, "#Tune - Error no category selcted. [#Tune help]"); - c->Message(0, "Usage #tune FindAcccuracy [A/B] [hit chance] [interval][loop_max][Avoidance Overwride][Info Level]"); - c->Message(0, "Exampled #tune FindAccuracy B 30"); + c->Message(Chat::White, "#Tune - Error no category selcted. [#Tune help]"); + c->Message(Chat::White, "Usage #tune FindAcccuracy [A/B] [hit chance] [interval][loop_max][Avoidance Overwride][Info Level]"); + c->Message(Chat::White, "Exampled #tune FindAccuracy B 30"); } return; @@ -11825,7 +11825,7 @@ void command_tune(Client *c, const Seperator *sep) if (!hit_chance) { - c->Message(0, "#Tune - Error must enter the desired hit chance on defender. Ie. Defender to have hit chance of 40 pct."); + c->Message(Chat::White, "#Tune - Error must enter the desired hit chance on defender. Ie. Defender to have hit chance of 40 pct."); return; } @@ -11849,9 +11849,9 @@ void command_tune(Client *c, const Seperator *sep) else if(!strcasecmp(sep->arg[2], "B")) c->Tune_FindAvoidanceByHitChance(attacker, defender, hit_chance, interval, max_loop,acc_override, info_level); else { - c->Message(0, "#Tune - Error no category selcted. [#Tune help]"); - c->Message(0, "Usage #tune FindAvoidance [A/B] [hit chance] [interval][loop_max][Accuracy Overwride][Info Level]"); - c->Message(0, "Exampled #tune FindAvoidance B 30"); + c->Message(Chat::White, "#Tune - Error no category selcted. [#Tune help]"); + c->Message(Chat::White, "Usage #tune FindAvoidance [A/B] [hit chance] [interval][loop_max][Accuracy Overwride][Info Level]"); + c->Message(Chat::White, "Exampled #tune FindAvoidance B 30"); } return; @@ -11875,7 +11875,7 @@ void command_logtest(Client *c, const Seperator *sep){ void command_crashtest(Client *c, const Seperator *sep) { - c->Message(0, "Alright, now we get an GPF ;) "); + c->Message(Chat::White, "Alright, now we get an GPF ;) "); char* gpf = 0; memcpy(gpf, "Ready to crash", 30); } @@ -11893,11 +11893,11 @@ void command_logs(Client *c, const Seperator *sep){ /* #logs list_settings */ if (strcasecmp(sep->arg[1], "list_settings") == 0 || (strcasecmp(sep->arg[1], "set") == 0 && strcasecmp(sep->arg[3], "") == 0)) { - c->Message(0, "[Category ID | console | file | gmsay | Category Description]"); + c->Message(Chat::White, "[Category ID | console | file | gmsay | Category Description]"); int redisplay_columns = 0; for (int i = 0; i < Logs::LogCategory::MaxCategoryID; i++) { if (redisplay_columns == 10) { - c->Message(0, "[Category ID | console | file | gmsay | Category Description]"); + c->Message(Chat::White, "[Category ID | console | file | gmsay | Category Description]"); redisplay_columns = 0; } c->Message( @@ -11928,8 +11928,8 @@ void command_logs(Client *c, const Seperator *sep){ logs_set = 1; } else{ - c->Message(0, "--- #logs set [console|file|gmsay] - Sets log settings during the lifetime of the zone"); - c->Message(0, "--- #logs set gmsay 20 1 - Would output Quest errors to gmsay"); + c->Message(Chat::White, "--- #logs set [console|file|gmsay] - Sets log settings during the lifetime of the zone"); + c->Message(Chat::White, "--- #logs set gmsay 20 1 - Would output Quest errors to gmsay"); } if (logs_set == 1){ c->Message(Chat::Yellow, "Your Log Settings have been applied"); @@ -11947,10 +11947,10 @@ void command_logs(Client *c, const Seperator *sep){ } } else { - c->Message(0, "#logs usage:"); - c->Message(0, "--- #logs reload_all - Reload all settings in world and all zone processes with what is defined in the database"); - c->Message(0, "--- #logs list_settings - Shows current log settings and categories loaded into the current process' memory"); - c->Message(0, "--- #logs set [console|file|gmsay] - Sets log settings during the lifetime of the zone"); + c->Message(Chat::White, "#logs usage:"); + c->Message(Chat::White, "--- #logs reload_all - Reload all settings in world and all zone processes with what is defined in the database"); + c->Message(Chat::White, "--- #logs list_settings - Shows current log settings and categories loaded into the current process' memory"); + c->Message(Chat::White, "--- #logs set [console|file|gmsay] - Sets log settings during the lifetime of the zone"); } } @@ -11979,24 +11979,24 @@ void command_resetaa_timer(Client *c, const Seperator *sep) { if(sep->IsNumber(1)) { int timer_id = atoi(sep->arg[1]); - c->Message(0, "Reset of timer %i for %s", timer_id, c->GetName()); + c->Message(Chat::White, "Reset of timer %i for %s", timer_id, c->GetName()); c->ResetAlternateAdvancementTimer(timer_id); } else if(!strcasecmp(sep->arg[1], "all")) { - c->Message(0, "Reset all timers for %s", c->GetName()); + c->Message(Chat::White, "Reset all timers for %s", c->GetName()); c->ResetAlternateAdvancementTimers(); } else { - c->Message(0, "usage: #resetaa_timer [all | timer_id]"); + c->Message(Chat::White, "usage: #resetaa_timer [all | timer_id]"); } } void command_reloadaa(Client *c, const Seperator *sep) { - c->Message(0, "Reloading Alternate Advancement Data..."); + c->Message(Chat::White, "Reloading Alternate Advancement Data..."); zone->LoadAlternateAdvancement(); - c->Message(0, "Alternate Advancement Data Reloaded"); + c->Message(Chat::White, "Alternate Advancement Data Reloaded"); entity_list.SendAlternateAdvancementStats(); } @@ -12011,7 +12011,7 @@ void command_hotfix(Client *c, const Seperator *sep) { hotfix_name = "hotfix_"; } - c->Message(0, "Creating and applying hotfix"); + c->Message(Chat::White, "Creating and applying hotfix"); std::thread t1( [c, hotfix_name]() { #ifdef WIN32 @@ -12036,7 +12036,7 @@ void command_hotfix(Client *c, const Seperator *sep) { } worldserver.SendPacket(&pack); - if (c) c->Message(0, "Hotfix applied"); + if (c) c->Message(Chat::White, "Hotfix applied"); }); t1.detach(); @@ -12048,12 +12048,12 @@ void command_load_shared_memory(Client *c, const Seperator *sep) { std::string hotfix_name; if(strcasecmp(hotfix.c_str(), sep->arg[1]) == 0) { - c->Message(0, "Cannot attempt to load this shared memory segment as it is already loaded."); + c->Message(Chat::White, "Cannot attempt to load this shared memory segment as it is already loaded."); return; } hotfix_name = sep->arg[1]; - c->Message(0, "Loading shared memory segment %s", hotfix_name.c_str()); + c->Message(Chat::White, "Loading shared memory segment %s", hotfix_name.c_str()); std::thread t1([c,hotfix_name]() { #ifdef WIN32 if(hotfix_name.length() > 0) { @@ -12069,7 +12069,7 @@ void command_load_shared_memory(Client *c, const Seperator *sep) { if(system(StringFormat("./shared_memory").c_str())); } #endif - c->Message(0, "Shared memory segment finished loading."); + c->Message(Chat::White, "Shared memory segment finished loading."); }); t1.detach(); @@ -12080,7 +12080,7 @@ void command_apply_shared_memory(Client *c, const Seperator *sep) { database.GetVariable("hotfix_name", hotfix); std::string hotfix_name = sep->arg[1]; - c->Message(0, "Applying shared memory segment %s", hotfix_name.c_str()); + c->Message(Chat::White, "Applying shared memory segment %s", hotfix_name.c_str()); database.SetVariable("hotfix_name", hotfix_name); ServerPacket pack(ServerOP_ChangeSharedMem, hotfix_name.length() + 1); @@ -12370,54 +12370,54 @@ void command_network(Client *c, const Seperator *sep) if (!strcasecmp(sep->arg[2], "all")) { - c->Message(0, "max_packet_size: %llu", (uint64_t)opts.daybreak_options.max_packet_size); - c->Message(0, "max_connection_count: %llu", (uint64_t)opts.daybreak_options.max_connection_count); - c->Message(0, "keepalive_delay_ms: %llu", (uint64_t)opts.daybreak_options.keepalive_delay_ms); - c->Message(0, "resend_delay_factor: %.2f", opts.daybreak_options.resend_delay_factor); - c->Message(0, "resend_delay_ms: %llu", (uint64_t)opts.daybreak_options.resend_delay_ms); - c->Message(0, "resend_delay_min: %llu", (uint64_t)opts.daybreak_options.resend_delay_min); - c->Message(0, "resend_delay_max: %llu", (uint64_t)opts.daybreak_options.resend_delay_max); - c->Message(0, "connect_delay_ms: %llu", (uint64_t)opts.daybreak_options.connect_delay_ms); - c->Message(0, "connect_stale_ms: %llu", (uint64_t)opts.daybreak_options.connect_stale_ms); - c->Message(0, "stale_connection_ms: %llu", (uint64_t)opts.daybreak_options.stale_connection_ms); - c->Message(0, "crc_length: %llu", (uint64_t)opts.daybreak_options.crc_length); - c->Message(0, "hold_size: %llu", (uint64_t)opts.daybreak_options.hold_size); - c->Message(0, "hold_length_ms: %llu", (uint64_t)opts.daybreak_options.hold_length_ms); - c->Message(0, "simulated_in_packet_loss: %llu", (uint64_t)opts.daybreak_options.simulated_in_packet_loss); - c->Message(0, "simulated_out_packet_loss: %llu", (uint64_t)opts.daybreak_options.simulated_out_packet_loss); - c->Message(0, "tic_rate_hertz: %.2f", opts.daybreak_options.tic_rate_hertz); - c->Message(0, "resend_timeout: %llu", (uint64_t)opts.daybreak_options.resend_timeout); - c->Message(0, "connection_close_time: %llu", (uint64_t)opts.daybreak_options.connection_close_time); - c->Message(0, "encode_passes[0]: %llu", (uint64_t)opts.daybreak_options.encode_passes[0]); - c->Message(0, "encode_passes[1]: %llu", (uint64_t)opts.daybreak_options.encode_passes[1]); - c->Message(0, "port: %llu", (uint64_t)opts.daybreak_options.port); + c->Message(Chat::White, "max_packet_size: %llu", (uint64_t)opts.daybreak_options.max_packet_size); + c->Message(Chat::White, "max_connection_count: %llu", (uint64_t)opts.daybreak_options.max_connection_count); + c->Message(Chat::White, "keepalive_delay_ms: %llu", (uint64_t)opts.daybreak_options.keepalive_delay_ms); + c->Message(Chat::White, "resend_delay_factor: %.2f", opts.daybreak_options.resend_delay_factor); + c->Message(Chat::White, "resend_delay_ms: %llu", (uint64_t)opts.daybreak_options.resend_delay_ms); + c->Message(Chat::White, "resend_delay_min: %llu", (uint64_t)opts.daybreak_options.resend_delay_min); + c->Message(Chat::White, "resend_delay_max: %llu", (uint64_t)opts.daybreak_options.resend_delay_max); + c->Message(Chat::White, "connect_delay_ms: %llu", (uint64_t)opts.daybreak_options.connect_delay_ms); + c->Message(Chat::White, "connect_stale_ms: %llu", (uint64_t)opts.daybreak_options.connect_stale_ms); + c->Message(Chat::White, "stale_connection_ms: %llu", (uint64_t)opts.daybreak_options.stale_connection_ms); + c->Message(Chat::White, "crc_length: %llu", (uint64_t)opts.daybreak_options.crc_length); + c->Message(Chat::White, "hold_size: %llu", (uint64_t)opts.daybreak_options.hold_size); + c->Message(Chat::White, "hold_length_ms: %llu", (uint64_t)opts.daybreak_options.hold_length_ms); + c->Message(Chat::White, "simulated_in_packet_loss: %llu", (uint64_t)opts.daybreak_options.simulated_in_packet_loss); + c->Message(Chat::White, "simulated_out_packet_loss: %llu", (uint64_t)opts.daybreak_options.simulated_out_packet_loss); + c->Message(Chat::White, "tic_rate_hertz: %.2f", opts.daybreak_options.tic_rate_hertz); + c->Message(Chat::White, "resend_timeout: %llu", (uint64_t)opts.daybreak_options.resend_timeout); + c->Message(Chat::White, "connection_close_time: %llu", (uint64_t)opts.daybreak_options.connection_close_time); + c->Message(Chat::White, "encode_passes[0]: %llu", (uint64_t)opts.daybreak_options.encode_passes[0]); + c->Message(Chat::White, "encode_passes[1]: %llu", (uint64_t)opts.daybreak_options.encode_passes[1]); + c->Message(Chat::White, "port: %llu", (uint64_t)opts.daybreak_options.port); } else { - c->Message(0, "Unknown get option: %s", sep->arg[2]); - c->Message(0, "Available options:"); + c->Message(Chat::White, "Unknown get option: %s", sep->arg[2]); + c->Message(Chat::White, "Available options:"); //Todo the rest of these when im less lazy. - //c->Message(0, "max_packet_size"); - //c->Message(0, "max_connection_count"); - //c->Message(0, "keepalive_delay_ms"); - //c->Message(0, "resend_delay_factor"); - //c->Message(0, "resend_delay_ms"); - //c->Message(0, "resend_delay_min"); - //c->Message(0, "resend_delay_max"); - //c->Message(0, "connect_delay_ms"); - //c->Message(0, "connect_stale_ms"); - //c->Message(0, "stale_connection_ms"); - //c->Message(0, "crc_length"); - //c->Message(0, "hold_size"); - //c->Message(0, "hold_length_ms"); - //c->Message(0, "simulated_in_packet_loss"); - //c->Message(0, "simulated_out_packet_loss"); - //c->Message(0, "tic_rate_hertz"); - //c->Message(0, "resend_timeout"); - //c->Message(0, "connection_close_time"); - //c->Message(0, "encode_passes[0]"); - //c->Message(0, "encode_passes[1]"); - //c->Message(0, "port"); - c->Message(0, "all"); + //c->Message(Chat::White, "max_packet_size"); + //c->Message(Chat::White, "max_connection_count"); + //c->Message(Chat::White, "keepalive_delay_ms"); + //c->Message(Chat::White, "resend_delay_factor"); + //c->Message(Chat::White, "resend_delay_ms"); + //c->Message(Chat::White, "resend_delay_min"); + //c->Message(Chat::White, "resend_delay_max"); + //c->Message(Chat::White, "connect_delay_ms"); + //c->Message(Chat::White, "connect_stale_ms"); + //c->Message(Chat::White, "stale_connection_ms"); + //c->Message(Chat::White, "crc_length"); + //c->Message(Chat::White, "hold_size"); + //c->Message(Chat::White, "hold_length_ms"); + //c->Message(Chat::White, "simulated_in_packet_loss"); + //c->Message(Chat::White, "simulated_out_packet_loss"); + //c->Message(Chat::White, "tic_rate_hertz"); + //c->Message(Chat::White, "resend_timeout"); + //c->Message(Chat::White, "connection_close_time"); + //c->Message(Chat::White, "encode_passes[0]"); + //c->Message(Chat::White, "encode_passes[1]"); + //c->Message(Chat::White, "port"); + c->Message(Chat::White, "all"); } } else if (!strcasecmp(sep->arg[1], "setopt")) @@ -12428,7 +12428,7 @@ void command_network(Client *c, const Seperator *sep) if (!strcasecmp(sep->arg[3], "")) { - c->Message(0, "Missing value for set"); + c->Message(Chat::White, "Missing value for set"); return; } @@ -12509,30 +12509,30 @@ void command_network(Client *c, const Seperator *sep) manager->SetOptions(opts); } else { - c->Message(0, "Unknown set option: %s", sep->arg[2]); - c->Message(0, "Available options:"); - c->Message(0, "max_connection_count"); - c->Message(0, "keepalive_delay_ms"); - c->Message(0, "resend_delay_factor"); - c->Message(0, "resend_delay_ms"); - c->Message(0, "resend_delay_min"); - c->Message(0, "resend_delay_max"); - c->Message(0, "connect_delay_ms"); - c->Message(0, "connect_stale_ms"); - c->Message(0, "stale_connection_ms"); - c->Message(0, "hold_size"); - c->Message(0, "hold_length_ms"); - c->Message(0, "simulated_in_packet_loss"); - c->Message(0, "simulated_out_packet_loss"); - c->Message(0, "resend_timeout"); - c->Message(0, "connection_close_time"); + c->Message(Chat::White, "Unknown set option: %s", sep->arg[2]); + c->Message(Chat::White, "Available options:"); + c->Message(Chat::White, "max_connection_count"); + c->Message(Chat::White, "keepalive_delay_ms"); + c->Message(Chat::White, "resend_delay_factor"); + c->Message(Chat::White, "resend_delay_ms"); + c->Message(Chat::White, "resend_delay_min"); + c->Message(Chat::White, "resend_delay_max"); + c->Message(Chat::White, "connect_delay_ms"); + c->Message(Chat::White, "connect_stale_ms"); + c->Message(Chat::White, "stale_connection_ms"); + c->Message(Chat::White, "hold_size"); + c->Message(Chat::White, "hold_length_ms"); + c->Message(Chat::White, "simulated_in_packet_loss"); + c->Message(Chat::White, "simulated_out_packet_loss"); + c->Message(Chat::White, "resend_timeout"); + c->Message(Chat::White, "connection_close_time"); } } else { - c->Message(0, "Unknown command: %s", sep->arg[1]); - c->Message(0, "Network commands avail:"); - c->Message(0, "getopt optname - Retrieve the current option value set."); - c->Message(0, "setopt optname - Set the current option allowed."); + c->Message(Chat::White, "Unknown command: %s", sep->arg[1]); + c->Message(Chat::White, "Network commands avail:"); + c->Message(Chat::White, "getopt optname - Retrieve the current option value set."); + c->Message(Chat::White, "setopt optname - Set the current option allowed."); } } diff --git a/zone/corpse.cpp b/zone/corpse.cpp index 2dc2872ec..e3a5eb80e 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -1371,7 +1371,7 @@ void Corpse::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) { void Corpse::QueryLoot(Client* to) { int x = 0, y = 0; // x = visible items, y = total items - to->Message(0, "Coin: %ip, %ig, %is, %ic", platinum, gold, silver, copper); + to->Message(Chat::White, "Coin: %ip, %ig, %is, %ic", platinum, gold, silver, copper); ItemList::iterator cur,end; cur = itemlist.begin(); @@ -1405,19 +1405,19 @@ void Corpse::QueryLoot(Client* to) { const EQEmu::ItemData* item = database.GetItem(sitem->item_id); if (item) - to->Message(0, "LootSlot: %i Item: %s (%d), Count: %i", sitem->lootslot, item->Name, item->ID, sitem->charges); + to->Message(Chat::White, "LootSlot: %i Item: %s (%d), Count: %i", sitem->lootslot, item->Name, item->ID, sitem->charges); else - to->Message(0, "Error: 0x%04x", sitem->item_id); + to->Message(Chat::White, "Error: 0x%04x", sitem->item_id); y++; } } if (IsPlayerCorpse()) { - to->Message(0, "%i visible %s (%i total) on %s (DBID: %i).", x, x==1?"item":"items", y, this->GetName(), this->GetCorpseDBID()); + to->Message(Chat::White, "%i visible %s (%i total) on %s (DBID: %i).", x, x==1?"item":"items", y, this->GetName(), this->GetCorpseDBID()); } else { - to->Message(0, "%i %s on %s.", y, y==1?"item":"items", this->GetName()); + to->Message(Chat::White, "%i %s on %s.", y, y==1?"item":"items", this->GetName()); } } @@ -1434,7 +1434,7 @@ bool Corpse::Summon(Client* client, bool spell, bool CheckDistance) { is_corpse_changed = true; } else { - client->Message(0, "Corpse is too far away."); + client->Message(Chat::White, "Corpse is too far away."); return false; } } @@ -1449,14 +1449,14 @@ bool Corpse::Summon(Client* client, bool spell, bool CheckDistance) { is_corpse_changed = true; } else { - client->Message(0, "Corpse is too far away."); + client->Message(Chat::White, "Corpse is too far away."); return false; } consented = true; } } if(!consented) { - client->Message(0, "You do not have permission to move this corpse."); + client->Message(Chat::White, "You do not have permission to move this corpse."); return false; } } diff --git a/zone/entity.cpp b/zone/entity.cpp index e52935ded..9003dc7f6 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -2902,15 +2902,15 @@ void EntityList::ListNPCCorpses(Client *client) uint32 x = 0; auto it = corpse_list.begin(); - client->Message(0, "NPC Corpses in the zone:"); + client->Message(Chat::White, "NPC Corpses in the zone:"); while (it != corpse_list.end()) { if (it->second->IsNPCCorpse()) { - client->Message(0, " %5d: %s", it->first, it->second->GetName()); + client->Message(Chat::White, " %5d: %s", it->first, it->second->GetName()); x++; } ++it; } - client->Message(0, "%d npc corpses listed.", x); + client->Message(Chat::White, "%d npc corpses listed.", x); } void EntityList::ListPlayerCorpses(Client *client) @@ -2918,15 +2918,15 @@ void EntityList::ListPlayerCorpses(Client *client) uint32 x = 0; auto it = corpse_list.begin(); - client->Message(0, "Player Corpses in the zone:"); + client->Message(Chat::White, "Player Corpses in the zone:"); while (it != corpse_list.end()) { if (it->second->IsPlayerCorpse()) { - client->Message(0, " %5d: %s", it->first, it->second->GetName()); + client->Message(Chat::White, " %5d: %s", it->first, it->second->GetName()); x++; } ++it; } - client->Message(0, "%d player corpses listed.", x); + client->Message(Chat::White, "%d player corpses listed.", x); } // returns the number of corpses deleted. A negative number indicates an error code. diff --git a/zone/global_loot_manager.cpp b/zone/global_loot_manager.cpp index 8e990c0ac..ccdf88840 100644 --- a/zone/global_loot_manager.cpp +++ b/zone/global_loot_manager.cpp @@ -21,14 +21,14 @@ std::vector GlobalLootManager::GetGlobalLootTables(NPC *mob) const void GlobalLootManager::ShowZoneGlobalLoot(Client *to) const { for (auto &e : m_entries) - to->Message(0, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID()); + to->Message(Chat::White, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID()); } void GlobalLootManager::ShowNPCGlobalLoot(Client *to, NPC *who) const { for (auto &e : m_entries) { if (e.PassesRules(who)) - to->Message(0, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID()); + to->Message(Chat::White, " %s : %d table %d", e.GetDescription().c_str(), e.GetID(), e.GetLootTableID()); } } diff --git a/zone/groups.cpp b/zone/groups.cpp index a4104b26a..cef37fbda 100644 --- a/zone/groups.cpp +++ b/zone/groups.cpp @@ -199,7 +199,7 @@ void Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinu Client *c = members[i]->CastToClient(); //I could not get MoneyOnCorpse to work, so we use this c->AddMoneyToPP(cpsplit, spsplit, gpsplit, ppsplit, true); - c->Message(2, msg.c_str()); + c->Message(Chat::Green, msg.c_str()); } } } @@ -1680,9 +1680,9 @@ void Group::NotifyMainTank(Client *c, uint8 toggle) if (c->ClientVersion() < EQEmu::versions::ClientVersion::SoD) { if(toggle) - c->Message(0, "%s is now Main Tank.", MainTankName.c_str()); + c->Message(Chat::White, "%s is now Main Tank.", MainTankName.c_str()); else - c->Message(0, "%s is no longer Main Tank.", MainTankName.c_str()); + c->Message(Chat::White, "%s is no longer Main Tank.", MainTankName.c_str()); } else { @@ -1775,9 +1775,9 @@ void Group::NotifyPuller(Client *c, uint8 toggle) if (c->ClientVersion() < EQEmu::versions::ClientVersion::SoD) { if(toggle) - c->Message(0, "%s is now Puller.", PullerName.c_str()); + c->Message(Chat::White, "%s is now Puller.", PullerName.c_str()); else - c->Message(0, "%s is no longer Puller.", PullerName.c_str()); + c->Message(Chat::White, "%s is no longer Puller.", PullerName.c_str()); } else { diff --git a/zone/guild_mgr.cpp b/zone/guild_mgr.cpp index 43157ed2d..eacfcb474 100644 --- a/zone/guild_mgr.cpp +++ b/zone/guild_mgr.cpp @@ -189,7 +189,7 @@ uint8 *ZoneGuildManager::MakeGuildMembers(uint32 guild_id, const char *prefix_na } void ZoneGuildManager::ListGuilds(Client *c) const { - c->Message(0, "Listing guilds on the server:"); + c->Message(Chat::White, "Listing guilds on the server:"); char leadername[64]; std::map::const_iterator cur, end; cur = m_guilds.begin(); @@ -199,12 +199,12 @@ void ZoneGuildManager::ListGuilds(Client *c) const { leadername[0] = '\0'; database.GetCharName(cur->second->leader_char_id, leadername); if (leadername[0] == '\0') - c->Message(0, " Guild #%i <%s>", cur->first, cur->second->name.c_str()); + c->Message(Chat::White, " Guild #%i <%s>", cur->first, cur->second->name.c_str()); else - c->Message(0, " Guild #%i <%s> Leader: %s", cur->first, cur->second->name.c_str(), leadername); + c->Message(Chat::White, " Guild #%i <%s> Leader: %s", cur->first, cur->second->name.c_str(), leadername); r++; } - c->Message(0, "%i guilds listed.", r); + c->Message(Chat::White, "%i guilds listed.", r); } @@ -212,17 +212,17 @@ void ZoneGuildManager::DescribeGuild(Client *c, uint32 guild_id) const { std::map::const_iterator res; res = m_guilds.find(guild_id); if(res == m_guilds.end()) { - c->Message(0, "Guild %d not found.", guild_id); + c->Message(Chat::White, "Guild %d not found.", guild_id); return; } const GuildInfo *info = res->second; - c->Message(0, "Guild info DB# %i <%s>", guild_id, info->name.c_str()); + c->Message(Chat::White, "Guild info DB# %i <%s>", guild_id, info->name.c_str()); char leadername[64]; database.GetCharName(info->leader_char_id, leadername); - c->Message(0, "Guild Leader: %s", leadername); + c->Message(Chat::White, "Guild Leader: %s", leadername); char permbuffer[256]; uint8 i; @@ -232,8 +232,8 @@ void ZoneGuildManager::DescribeGuild(Client *c, uint32 guild_id) const { for(r = 0; r < _MaxGuildAction; r++) permptr += sprintf(permptr, " %s: %c", GuildActionNames[r], info->ranks[i].permissions[r]?'Y':'N'); - c->Message(0, "Rank %i: %s", i, info->ranks[i].name.c_str()); - c->Message(0, "Permissions: %s", permbuffer); + c->Message(Chat::White, "Rank %i: %s", i, info->ranks[i].name.c_str()); + c->Message(Chat::White, "Permissions: %s", permbuffer); } } @@ -537,14 +537,14 @@ void ZoneGuildManager::AddMemberApproval(uint32 refid,Client* name) if(tmp != 0) { if(!tmp->AddMemberApproval(name)) - name->Message(0,"Unable to add to list."); + name->Message(Chat::White,"Unable to add to list."); else { - name->Message(0,"Added to list."); + name->Message(Chat::White,"Added to list."); } } else - name->Message(0,"Unable to find guild reference id."); + name->Message(Chat::White,"Unable to find guild reference id."); } ZoneGuildManager::~ZoneGuildManager() @@ -1397,7 +1397,7 @@ bool GuildApproval::ProcessApproval() if(deletion_timer->Check() || !owner) { if(owner) - owner->Message(0,"You took too long! Your guild request has been deleted."); + owner->Message(Chat::White,"You took too long! Your guild request has been deleted."); return false; } @@ -1414,7 +1414,7 @@ GuildApproval::GuildApproval(const char* guildname, Client* owner,uint32 id) this->owner = owner; this->refid = id; if(owner) - owner->Message(0,"You can now start getting your guild approved, tell your %i members to #guildapprove %i, you have 30 minutes to create your guild.",tmp,GetID()); + owner->Message(Chat::White,"You can now start getting your guild approved, tell your %i members to #guildapprove %i, you have 30 minutes to create your guild.",tmp,GetID()); for(int i=0;iMessage(0,"%i: %s",i,members[i]->GetName()); + requestee->Message(Chat::White,"%i: %s",i,members[i]->GetName()); } } @@ -1484,8 +1484,8 @@ void GuildApproval::GuildApproved() { if(members[i]) { - owner->Message(0, "%s",members[i]->GetName()); - owner->Message(0, "%i",members[i]->CharacterID()); + owner->Message(Chat::White, "%s",members[i]->GetName()); + owner->Message(Chat::White, "%i",members[i]->CharacterID()); guild_mgr.SetGuild(members[i]->CharacterID(),tmpeq,0); size_t len = MBUFFER - strlen(gmembers)+1; strncat(gmembers," ",len); @@ -1521,7 +1521,7 @@ void GuildApproval::GuildApproved() memcpy(pack->pBuffer, &tmpeq, 4); worldserver.SendPacket(pack); safe_delete(pack); - owner->Message(0, "Your guild was created."); + owner->Message(Chat::White, "Your guild was created."); owner = 0; } diff --git a/zone/hate_list.cpp b/zone/hate_list.cpp index 242a4c8e3..478c9ac50 100644 --- a/zone/hate_list.cpp +++ b/zone/hate_list.cpp @@ -608,7 +608,7 @@ void HateList::PrintHateListToClient(Client *c) while (iterator != list.end()) { struct_HateList *e = (*iterator); - c->Message(0, "- name: %s, damage: %d, hate: %d", + c->Message(Chat::White, "- name: %s, damage: %d, hate: %d", (e->entity_on_hatelist && e->entity_on_hatelist->GetName()) ? e->entity_on_hatelist->GetName() : "(null)", e->hatelist_damage, e->stored_hate_amount); diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 94ca78007..500663491 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -3397,7 +3397,7 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool Log(Logs::General, Logs::Error, "Client::InterrogateInventory() called for %s by %s with an error state of %s", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE")); } if (!silent) { - requester->Message(1, "--- Inventory Interrogation Report for %s (requested by: %s, error state: %s) ---", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE")); + requester->Message(Chat::Default, "--- Inventory Interrogation Report for %s (requested by: %s, error state: %s) ---", GetName(), requester->GetName(), (error ? "TRUE" : "FALSE")); } // call InterrogateInventory_ for report @@ -3419,8 +3419,8 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool Log(Logs::Detail, Logs::None, "[CLIENT] Client::InterrogateInventory() -- End"); } if (!silent) { - requester->Message(1, "Target interrogation flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE")); - requester->Message(1, "--- End of Interrogation Report ---"); + requester->Message(Chat::Default, "Target interrogation flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE")); + requester->Message(Chat::Default, "--- End of Interrogation Report ---"); } instmap.clear(); diff --git a/zone/mob.cpp b/zone/mob.cpp index a5d7ae261..f9665af32 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1551,39 +1551,39 @@ void Mob::ShowStats(Client* client) } else if (IsCorpse()) { if (IsPlayerCorpse()) { - client->Message(0, " CharID: %i PlayerCorpse: %i", CastToCorpse()->GetCharID(), CastToCorpse()->GetCorpseDBID()); + client->Message(Chat::White, " CharID: %i PlayerCorpse: %i", CastToCorpse()->GetCharID(), CastToCorpse()->GetCorpseDBID()); } else { - client->Message(0, " NPCCorpse", GetID()); + client->Message(Chat::White, " NPCCorpse", GetID()); } } else { - client->Message(0, " Level: %i AC: %i Class: %i Size: %1.1f Haste: %i", GetLevel(), ACSum(), GetClass(), GetSize(), GetHaste()); - client->Message(0, " HP: %i Max HP: %i",GetHP(), GetMaxHP()); - client->Message(0, " Mana: %i Max Mana: %i", GetMana(), GetMaxMana()); - client->Message(0, " Total ATK: %i Worn/Spell ATK (Cap %i): %i", GetATK(), RuleI(Character, ItemATKCap), GetATKBonus()); - client->Message(0, " STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA()); - client->Message(0, " MR: %i PR: %i FR: %i CR: %i DR: %i Corruption: %i PhR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR(), GetCorrup(), GetPhR()); - client->Message(0, " Race: %i BaseRace: %i Texture: %i HelmTexture: %i Gender: %i BaseGender: %i", GetRace(), GetBaseRace(), GetTexture(), GetHelmTexture(), GetGender(), GetBaseGender()); + client->Message(Chat::White, " Level: %i AC: %i Class: %i Size: %1.1f Haste: %i", GetLevel(), ACSum(), GetClass(), GetSize(), GetHaste()); + client->Message(Chat::White, " HP: %i Max HP: %i",GetHP(), GetMaxHP()); + client->Message(Chat::White, " Mana: %i Max Mana: %i", GetMana(), GetMaxMana()); + client->Message(Chat::White, " Total ATK: %i Worn/Spell ATK (Cap %i): %i", GetATK(), RuleI(Character, ItemATKCap), GetATKBonus()); + client->Message(Chat::White, " STR: %i STA: %i DEX: %i AGI: %i INT: %i WIS: %i CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA()); + client->Message(Chat::White, " MR: %i PR: %i FR: %i CR: %i DR: %i Corruption: %i PhR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR(), GetCorrup(), GetPhR()); + client->Message(Chat::White, " Race: %i BaseRace: %i Texture: %i HelmTexture: %i Gender: %i BaseGender: %i", GetRace(), GetBaseRace(), GetTexture(), GetHelmTexture(), GetGender(), GetBaseGender()); if (client->Admin() >= 100) - client->Message(0, " EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted); + client->Message(Chat::White, " EntityID: %i PetID: %i OwnerID: %i AIControlled: %i Targetted: %i", GetID(), GetPetID(), GetOwnerID(), IsAIControlled(), targeted); if (IsNPC()) { NPC *n = CastToNPC(); uint32 spawngroupid = 0; if(n->respawn2 != 0) spawngroupid = n->respawn2->SpawnGroupID(); - client->Message(0, " NPCID: %u SpawnGroupID: %u Grid: %i LootTable: %u FactionID: %i SpellsID: %u ", GetNPCTypeID(),spawngroupid, n->GetGrid(), n->GetLoottableID(), n->GetNPCFactionID(), n->GetNPCSpellsID()); - client->Message(0, " Accuracy: %i MerchantID: %i EmoteID: %i Runspeed: %.3f Walkspeed: %.3f", n->GetAccuracyRating(), n->MerchantType, n->GetEmoteID(), static_cast(0.025f * n->GetRunspeed()), static_cast(0.025f * n->GetWalkspeed())); + client->Message(Chat::White, " NPCID: %u SpawnGroupID: %u Grid: %i LootTable: %u FactionID: %i SpellsID: %u ", GetNPCTypeID(),spawngroupid, n->GetGrid(), n->GetLoottableID(), n->GetNPCFactionID(), n->GetNPCSpellsID()); + client->Message(Chat::White, " Accuracy: %i MerchantID: %i EmoteID: %i Runspeed: %.3f Walkspeed: %.3f", n->GetAccuracyRating(), n->MerchantType, n->GetEmoteID(), static_cast(0.025f * n->GetRunspeed()), static_cast(0.025f * n->GetWalkspeed())); n->QueryLoot(client); } if (IsAIControlled()) { - client->Message(0, " AggroRange: %1.0f AssistRange: %1.0f", GetAggroRange(), GetAssistRange()); + client->Message(Chat::White, " AggroRange: %1.0f AssistRange: %1.0f", GetAggroRange(), GetAssistRange()); } - client->Message(0, " compute_tohit: %i TotalToHit: %i", compute_tohit(EQEmu::skills::SkillHandtoHand), GetTotalToHit(EQEmu::skills::SkillHandtoHand, 0)); - client->Message(0, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense()); - client->Message(0, " offense: %i mitigation ac: %i", offense(EQEmu::skills::SkillHandtoHand), GetMitigationAC()); + client->Message(Chat::White, " compute_tohit: %i TotalToHit: %i", compute_tohit(EQEmu::skills::SkillHandtoHand), GetTotalToHit(EQEmu::skills::SkillHandtoHand, 0)); + client->Message(Chat::White, " compute_defense: %i TotalDefense: %i", compute_defense(), GetTotalDefense()); + client->Message(Chat::White, " offense: %i mitigation ac: %i", offense(EQEmu::skills::SkillHandtoHand), GetMitigationAC()); } } @@ -1620,33 +1620,33 @@ void Mob::DoAnim(const int animnum, int type, bool ackreq, eqFilterType filter) void Mob::ShowBuffs(Client* client) { if(SPDAT_RECORDS <= 0) return; - client->Message(0, "Buffs on: %s", this->GetName()); + client->Message(Chat::White, "Buffs on: %s", this->GetName()); uint32 i; uint32 buff_count = GetMaxTotalSlots(); for (i=0; i < buff_count; i++) { if (buffs[i].spellid != SPELL_UNKNOWN) { if (spells[buffs[i].spellid].buffdurationformula == DF_Permanent) - client->Message(0, " %i: %s: Permanent", i, spells[buffs[i].spellid].name); + client->Message(Chat::White, " %i: %s: Permanent", i, spells[buffs[i].spellid].name); else - client->Message(0, " %i: %s: %i tics left", i, spells[buffs[i].spellid].name, buffs[i].ticsremaining); + client->Message(Chat::White, " %i: %s: %i tics left", i, spells[buffs[i].spellid].name, buffs[i].ticsremaining); } } if (IsClient()){ - client->Message(0, "itembonuses:"); - client->Message(0, "Atk:%i Ac:%i HP(%i):%i Mana:%i", itembonuses.ATK, itembonuses.AC, itembonuses.HPRegen, itembonuses.HP, itembonuses.Mana); - client->Message(0, "Str:%i Sta:%i Dex:%i Agi:%i Int:%i Wis:%i Cha:%i", + client->Message(Chat::White, "itembonuses:"); + client->Message(Chat::White, "Atk:%i Ac:%i HP(%i):%i Mana:%i", itembonuses.ATK, itembonuses.AC, itembonuses.HPRegen, itembonuses.HP, itembonuses.Mana); + client->Message(Chat::White, "Str:%i Sta:%i Dex:%i Agi:%i Int:%i Wis:%i Cha:%i", itembonuses.STR,itembonuses.STA,itembonuses.DEX,itembonuses.AGI,itembonuses.INT,itembonuses.WIS,itembonuses.CHA); - client->Message(0, "SvMagic:%i SvFire:%i SvCold:%i SvPoison:%i SvDisease:%i", + client->Message(Chat::White, "SvMagic:%i SvFire:%i SvCold:%i SvPoison:%i SvDisease:%i", itembonuses.MR,itembonuses.FR,itembonuses.CR,itembonuses.PR,itembonuses.DR); - client->Message(0, "DmgShield:%i Haste:%i", itembonuses.DamageShield, itembonuses.haste ); - client->Message(0, "spellbonuses:"); - client->Message(0, "Atk:%i Ac:%i HP(%i):%i Mana:%i", spellbonuses.ATK, spellbonuses.AC, spellbonuses.HPRegen, spellbonuses.HP, spellbonuses.Mana); - client->Message(0, "Str:%i Sta:%i Dex:%i Agi:%i Int:%i Wis:%i Cha:%i", + client->Message(Chat::White, "DmgShield:%i Haste:%i", itembonuses.DamageShield, itembonuses.haste ); + client->Message(Chat::White, "spellbonuses:"); + client->Message(Chat::White, "Atk:%i Ac:%i HP(%i):%i Mana:%i", spellbonuses.ATK, spellbonuses.AC, spellbonuses.HPRegen, spellbonuses.HP, spellbonuses.Mana); + client->Message(Chat::White, "Str:%i Sta:%i Dex:%i Agi:%i Int:%i Wis:%i Cha:%i", spellbonuses.STR,spellbonuses.STA,spellbonuses.DEX,spellbonuses.AGI,spellbonuses.INT,spellbonuses.WIS,spellbonuses.CHA); - client->Message(0, "SvMagic:%i SvFire:%i SvCold:%i SvPoison:%i SvDisease:%i", + client->Message(Chat::White, "SvMagic:%i SvFire:%i SvCold:%i SvPoison:%i SvDisease:%i", spellbonuses.MR,spellbonuses.FR,spellbonuses.CR,spellbonuses.PR,spellbonuses.DR); - client->Message(0, "DmgShield:%i Haste:%i", spellbonuses.DamageShield, spellbonuses.haste ); + client->Message(Chat::White, "DmgShield:%i Haste:%i", spellbonuses.DamageShield, spellbonuses.haste ); } } @@ -1654,15 +1654,15 @@ void Mob::ShowBuffList(Client* client) { if(SPDAT_RECORDS <= 0) return; - client->Message(0, "Buffs on: %s", this->GetCleanName()); + client->Message(Chat::White, "Buffs on: %s", this->GetCleanName()); uint32 i; uint32 buff_count = GetMaxTotalSlots(); for (i = 0; i < buff_count; i++) { if (buffs[i].spellid != SPELL_UNKNOWN) { if (spells[buffs[i].spellid].buffdurationformula == DF_Permanent) - client->Message(0, " %i: %s: Permanent", i, spells[buffs[i].spellid].name); + client->Message(Chat::White, " %i: %s: Permanent", i, spells[buffs[i].spellid].name); else - client->Message(0, " %i: %s: %i tics left", i, spells[buffs[i].spellid].name, buffs[i].ticsremaining); + client->Message(Chat::White, " %i: %s: %i tics left", i, spells[buffs[i].spellid].name, buffs[i].ticsremaining); } } } diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 6b7218417..31a0fcb40 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -2758,7 +2758,7 @@ void NPC::AISpellsList(Client *c) return; for (auto it = AIspells.begin(); it != AIspells.end(); ++it) - c->Message(0, "%s (%d): Type %d, Priority %d, Recast Delay %d, Resist Adjust %d, Min HP %d, Max HP %d", + c->Message(Chat::White, "%s (%d): Type %d, Priority %d, Recast Delay %d, Resist Adjust %d, Min HP %d, Max HP %d", spells[it->spellid].name, it->spellid, it->type, it->priority, it->recast_delay, it->resist_adjust, it->min_hp, it->max_hp); return; diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index 174a00330..8cf486dea 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -624,7 +624,7 @@ inline void NPCCommandsMenu(Client* client, NPC* npc) if (menu_commands.length() > 0) { std::string dev_menu = "[" + EQEmu::SayLinkEngine::GenerateQuestSaylink("#devtools", false, "DevTools") + "] ";; - client->Message(0, "| %s [Show Commands] %s", dev_menu.c_str(), menu_commands.c_str()); + client->Message(Chat::White, "| %s [Show Commands] %s", dev_menu.c_str(), menu_commands.c_str()); } } diff --git a/zone/npc.cpp b/zone/npc.cpp index 30bf0b614..ebbf5397f 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -611,7 +611,7 @@ void NPC::ClearItemList() { void NPC::QueryLoot(Client* to) { - to->Message(0, "| # Current Loot (%s) LootTableID: %i", GetName(), GetLoottableID()); + to->Message(Chat::White, "| # Current Loot (%s) LootTableID: %i", GetName(), GetLoottableID()); int item_count = 0; for (auto cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++item_count) { @@ -639,7 +639,7 @@ void NPC::QueryLoot(Client* to) ); } - to->Message(0, "| %i Platinum %i Gold %i Silver %i Copper", platinum, gold, silver, copper); + to->Message(Chat::White, "| %i Platinum %i Gold %i Silver %i Copper", platinum, gold, silver, copper); } void NPC::AddCash(uint16 in_copper, uint16 in_silver, uint16 in_gold, uint16 in_platinum) { @@ -1190,17 +1190,17 @@ NPC* NPC::SpawnNPC(const char* spawncommand, const glm::vec4& position, Client* if (client) { // Notify client of spawn data - client->Message(0, "New spawn:"); - client->Message(0, "Name: %s", npc->name); - client->Message(0, "Race: %u", npc->race); - client->Message(0, "Level: %u", npc->level); - client->Message(0, "Material: %u", npc->texture); - client->Message(0, "Current/Max HP: %i", npc->max_hp); - client->Message(0, "Gender: %u", npc->gender); - client->Message(0, "Class: %u", npc->class_); - client->Message(0, "Weapon Item Number: %u/%u", npc->d_melee_texture1, npc->d_melee_texture2); - client->Message(0, "MerchantID: %u", npc->MerchantType); - client->Message(0, "Bodytype: %u", npc->bodytype); + client->Message(Chat::White, "New spawn:"); + client->Message(Chat::White, "Name: %s", npc->name); + client->Message(Chat::White, "Race: %u", npc->race); + client->Message(Chat::White, "Level: %u", npc->level); + client->Message(Chat::White, "Material: %u", npc->texture); + client->Message(Chat::White, "Current/Max HP: %i", npc->max_hp); + client->Message(Chat::White, "Gender: %u", npc->gender); + client->Message(Chat::White, "Class: %u", npc->class_); + client->Message(Chat::White, "Weapon Item Number: %u/%u", npc->d_melee_texture1, npc->d_melee_texture2); + client->Message(Chat::White, "MerchantID: %u", npc->MerchantType); + client->Message(Chat::White, "Bodytype: %u", npc->bodytype); } return npc; @@ -1471,7 +1471,7 @@ uint32 ZoneDatabase::AddNPCTypes(const char *zone, uint32 zone_version, Client * npc_type_id = results.LastInsertedID(); if (client) - client->Message(0, "%s npc_type ID %i created successfully!", numberlessName, npc_type_id); + client->Message(Chat::White, "%s npc_type ID %i created successfully!", numberlessName, npc_type_id); return 1; } @@ -1694,7 +1694,7 @@ void NPC::PickPocket(Client* thief) return; } - thief->Message(0, "This target's pockets are empty"); + thief->Message(Chat::White, "This target's pockets are empty"); thief->SendPickPocketResponse(this, 0, PickPocketFailed); } diff --git a/zone/object.cpp b/zone/object.cpp index 4306c6642..241d3a3f1 100644 --- a/zone/object.cpp +++ b/zone/object.cpp @@ -572,7 +572,7 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object) if (sender->ClientVersion() >= EQEmu::versions::ClientVersion::RoF) { coa->drop_id = 0xFFFFFFFF; - sender->Message(0, "Someone else is using that. Try again later."); + sender->Message(Chat::White, "Someone else is using that. Try again later."); } } diff --git a/zone/pathfinder_nav_mesh.cpp b/zone/pathfinder_nav_mesh.cpp index 090afa920..262d7a923 100644 --- a/zone/pathfinder_nav_mesh.cpp +++ b/zone/pathfinder_nav_mesh.cpp @@ -355,7 +355,7 @@ void PathfinderNavmesh::DebugCommand(Client *c, const Seperator *sep) { if (sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) { - c->Message(0, "#path show: Plots a path from the user to their target."); + c->Message(Chat::White, "#path show: Plots a path from the user to their target."); return; } diff --git a/zone/pathfinder_waypoint.cpp b/zone/pathfinder_waypoint.cpp index 58ad5afea..83d924499 100644 --- a/zone/pathfinder_waypoint.cpp +++ b/zone/pathfinder_waypoint.cpp @@ -200,9 +200,9 @@ void PathfinderWaypoint::DebugCommand(Client *c, const Seperator *sep) { if(sep->arg[1][0] == '\0' || !strcasecmp(sep->arg[1], "help")) { - c->Message(0, "Syntax: #path shownodes: Spawns a npc to represent every npc node."); - c->Message(0, "#path show: Plots a path from the user to their target."); - c->Message(0, "#path info node_id: Gives information about node info (requires shownode target)."); + c->Message(Chat::White, "Syntax: #path shownodes: Spawns a npc to represent every npc node."); + c->Message(Chat::White, "#path show: Plots a path from the user to their target."); + c->Message(Chat::White, "#path info node_id: Gives information about node info (requires shownode target)."); return; } @@ -425,11 +425,11 @@ void PathfinderWaypoint::NodeInfo(Client *c) return; } - c->Message(0, "Pathing node: %i at (%.2f, %.2f, %.2f) with bestz %.2f", + c->Message(Chat::White, "Pathing node: %i at (%.2f, %.2f, %.2f) with bestz %.2f", node->id, node->v.x, node->v.y, node->v.z, node->bestz); for (auto &edge : node->edges) { - c->Message(0, "id: %i, distance: %.2f, door id: %i, is teleport: %i", + c->Message(Chat::White, "id: %i, distance: %.2f, door id: %i, is teleport: %i", edge.first, edge.second.distance, edge.second.door_id, diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index cc19c59fd..9c8898b2e 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1097,7 +1097,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) { initiator->GetPP().disciplines.values[r] = spell_id_; database.SaveCharacterDisc(char_id, r, spell_id_); change = true; - initiator->Message(0, "You have learned a new discipline!"); + initiator->Message(Chat::White, "You have learned a new discipline!"); ++count; // success counter } break; // continue the 1st loop @@ -1109,7 +1109,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) { initiator->GetPP().disciplines.values[r] = spell_id_; database.SaveCharacterDisc(char_id, r, spell_id_); change = true; - initiator->Message(0, "You have learned a new discipline!"); + initiator->Message(Chat::White, "You have learned a new discipline!"); ++count; } break; @@ -1118,7 +1118,7 @@ uint16 QuestManager::traindiscs(uint8 max_level, uint8 min_level) { initiator->GetPP().disciplines.values[r] = spell_id_; database.SaveCharacterDisc(char_id, r, spell_id_); change = true;; - initiator->Message(0, "You have learned a new discipline!"); + initiator->Message(Chat::White, "You have learned a new discipline!"); ++count; // success counter break; // continue the 1st loop } @@ -1411,7 +1411,7 @@ void QuestManager::itemlink(int item_id) { linker.SetLinkType(EQEmu::saylink::SayLinkItemData); linker.SetItemData(item); - initiator->Message(0, "%s tells you, %s", owner->GetCleanName(), linker.GenerateLink().c_str()); + initiator->Message(Chat::White, "%s tells you, %s", owner->GetCleanName(), linker.GenerateLink().c_str()); } } @@ -2171,11 +2171,11 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level std::string test_name = name; bool available_flag = false; if(!database.botdb.QueryNameAvailablity(test_name, available_flag)) { - initiator->Message(0, "%s for '%s'", BotDatabase::fail::QueryNameAvailablity(), (char*)name); + initiator->Message(Chat::White, "%s for '%s'", BotDatabase::fail::QueryNameAvailablity(), (char*)name); return false; } if (!available_flag) { - initiator->Message(0, "The name %s is already being used or is invalid. Please choose a different name.", (char*)name); + initiator->Message(Chat::White, "The name %s is already being used or is invalid. Please choose a different name.", (char*)name); return false; } @@ -2184,23 +2184,23 @@ bool QuestManager::createBot(const char *name, const char *lastname, uint8 level if(NewBot) { if(!NewBot->IsValidRaceClassCombo()) { - initiator->Message(0, "That Race/Class combination cannot be created."); + initiator->Message(Chat::White, "That Race/Class combination cannot be created."); return false; } if(!NewBot->IsValidName()) { - initiator->Message(0, "%s has invalid characters. You can use only the A-Z, a-z and _ characters in a bot name.", NewBot->GetCleanName()); + initiator->Message(Chat::White, "%s has invalid characters. You can use only the A-Z, a-z and _ characters in a bot name.", NewBot->GetCleanName()); return false; } // Now that all validation is complete, we can save our newly created bot if(!NewBot->Save()) { - initiator->Message(0, "Unable to save %s as a bot.", NewBot->GetCleanName()); + initiator->Message(Chat::White, "Unable to save %s as a bot.", NewBot->GetCleanName()); } else { - initiator->Message(0, "%s saved as bot %u.", NewBot->GetCleanName(), NewBot->GetBotID()); + initiator->Message(Chat::White, "%s saved as bot %u.", NewBot->GetCleanName(), NewBot->GetBotID()); return true; } } diff --git a/zone/raids.cpp b/zone/raids.cpp index 51fd2296f..9b5485f40 100644 --- a/zone/raids.cpp +++ b/zone/raids.cpp @@ -813,7 +813,7 @@ void Raid::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum //I could not get MoneyOnCorpse to work, so we use this members[i].member->AddMoneyToPP(cpsplit, spsplit, gpsplit, ppsplit, true); - members[i].member->Message(2, msg.c_str()); + members[i].member->Message(Chat::Green, msg.c_str()); } } } diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index 3940834b8..cc0ea1b3b 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -551,7 +551,7 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) { if (bIsBehind || bCanFrontalBS || (IsNPC() && CanFacestab())) { // Player is behind other OR can do Frontal Backstab if (bCanFrontalBS && IsClient()) // I don't think there is any message ... - CastToClient()->Message(0,"Your fierce attack is executed with such grace, your target did not see it coming!"); + CastToClient()->Message(Chat::White,"Your fierce attack is executed with such grace, your target did not see it coming!"); RogueBackstab(other,false,ReuseTime); if (level > 54) { diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 1f8acfa2f..6286f9c51 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -387,7 +387,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove TryTriggerOnValueAmount(false, true); #ifdef SPELL_EFFECT_SPAM if (caster) - caster->Message(0, "You have gained %+i mana!", effect_value); + caster->Message(Chat::White, "You have gained %+i mana!", effect_value); #endif } } @@ -745,19 +745,19 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove WipeHateList(); if (IsClient() && caster->IsClient()) { - caster->Message(0, "Unable to cast charm on a fellow player."); + caster->Message(Chat::White, "Unable to cast charm on a fellow player."); BuffFadeByEffect(SE_Charm); break; } else if(IsCorpse()) { - caster->Message(0, "Unable to cast charm on a corpse."); + caster->Message(Chat::White, "Unable to cast charm on a corpse."); BuffFadeByEffect(SE_Charm); break; } else if(caster->GetPet() != nullptr && caster->IsClient()) { - caster->Message(0, "You cannot charm something when you already have a pet."); + caster->Message(Chat::White, "You cannot charm something when you already have a pet."); BuffFadeByEffect(SE_Charm); break; } else if(GetOwner()) { - caster->Message(0, "You cannot charm someone else's pet!"); + caster->Message(Chat::White, "You cannot charm someone else's pet!"); BuffFadeByEffect(SE_Charm); break; } diff --git a/zone/spells.cpp b/zone/spells.cpp index f6cf829c5..e0ade3798 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1211,7 +1211,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo if(!HasInstrument) { // if the instrument is missing, log it and interrupt the song Log(Logs::Detail, Logs::Spells, "Song %d: Canceled. Missing required instrument %d", spell_id, component); if(c->GetGM()) - c->Message(0, "Your GM status allows you to finish casting even though you're missing a required instrument."); + c->Message(Chat::White, "Your GM status allows you to finish casting even though you're missing a required instrument."); else { InterruptSpell(); return; @@ -1248,7 +1248,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo if (missingreags) { if(c->GetGM()) - c->Message(0, "Your GM status allows you to finish casting even though you're missing required components."); + c->Message(Chat::White, "Your GM status allows you to finish casting even though you're missing required components."); else { InterruptSpell(); return; diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 40d301e7d..895e01e90 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -1266,18 +1266,18 @@ void TaskManager::ExplainTask(Client*c, int TaskID) { if(!c) return; if((TaskID<=0) || (TaskID>=MAXTASKS)) { - c->Message(0, "TaskID out-of-range."); + c->Message(Chat::White, "TaskID out-of-range."); return; } if(Tasks[TaskID] == nullptr) { - c->Message(0, "Task does not exist."); + c->Message(Chat::White, "Task does not exist."); return; } char Explanation[1000], *ptr; - c->Message(0, "Task %4i: Title: %s", TaskID, Tasks[TaskID]->Description.c_str()); - c->Message(0, "%3i Activities", Tasks[TaskID]->ActivityCount); + c->Message(Chat::White, "Task %4i: Title: %s", TaskID, Tasks[TaskID]->Description.c_str()); + c->Message(Chat::White, "%3i Activities", Tasks[TaskID]->ActivityCount); ptr = Explanation; for(int i=0; iActivityCount; i++) { @@ -1936,7 +1936,7 @@ void ClientTaskState::IncrementDoneCount(Client *c, TaskInformation *Task, int T // Send the updated task/activity list to the client taskmanager->SendSingleActiveTaskToClient(c, *info, TaskComplete, false); // Inform the client the task has been updated, both by a chat message - c->Message(0, "Your task '%s' has been updated.", Task->Title.c_str()); + c->Message(Chat::White, "Your task '%s' has been updated.", Task->Title.c_str()); if(Task->Activity[ActivityID].GoalMethod != METHODQUEST) { if (!ignore_quest_update){ @@ -2306,12 +2306,12 @@ void ClientTaskState::ResetTaskActivity(Client *c, int TaskID, int ActivityID) void ClientTaskState::ShowClientTasks(Client *c) { - c->Message(0, "Task Information:"); + c->Message(Chat::White, "Task Information:"); if (ActiveTask.TaskID != TASKSLOTEMPTY) { - c->Message(0, "Task: %i %s", ActiveTask.TaskID, taskmanager->Tasks[ActiveTask.TaskID]->Title.c_str()); - c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveTask.TaskID]->Description.c_str()); + c->Message(Chat::White, "Task: %i %s", ActiveTask.TaskID, taskmanager->Tasks[ActiveTask.TaskID]->Title.c_str()); + c->Message(Chat::White, " Description: [%s]\n", taskmanager->Tasks[ActiveTask.TaskID]->Description.c_str()); for (int j = 0; j < taskmanager->GetActivityCount(ActiveTask.TaskID); j++) { - c->Message(0, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)", + c->Message(Chat::White, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)", ActiveTask.Activity[j].ActivityID, ActiveTask.Activity[j].DoneCount, ActiveTask.Activity[j].State); } @@ -2321,11 +2321,11 @@ void ClientTaskState::ShowClientTasks(Client *c) if (ActiveQuests[i].TaskID == TASKSLOTEMPTY) continue; - c->Message(0, "Quest: %i %s", ActiveQuests[i].TaskID, + c->Message(Chat::White, "Quest: %i %s", ActiveQuests[i].TaskID, taskmanager->Tasks[ActiveQuests[i].TaskID]->Title.c_str()); - c->Message(0, " Description: [%s]\n", taskmanager->Tasks[ActiveQuests[i].TaskID]->Description.c_str()); + c->Message(Chat::White, " Description: [%s]\n", taskmanager->Tasks[ActiveQuests[i].TaskID]->Description.c_str()); for (int j = 0; j < taskmanager->GetActivityCount(ActiveQuests[i].TaskID); j++) { - c->Message(0, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)", + c->Message(Chat::White, " Activity: %2d, DoneCount: %2d, Status: %d (0=Hidden, 1=Active, 2=Complete)", ActiveQuests[i].Activity[j].ActivityID, ActiveQuests[i].Activity[j].DoneCount, ActiveQuests[i].Activity[j].State); } @@ -3309,7 +3309,7 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor ActiveTaskCount++; taskmanager->SendSingleActiveTaskToClient(c, *active_slot, false, true); - c->Message(0, "You have been assigned the task '%s'.", taskmanager->Tasks[TaskID]->Title.c_str()); + c->Message(Chat::White, "You have been assigned the task '%s'.", taskmanager->Tasks[TaskID]->Title.c_str()); std::string buf = std::to_string(TaskID); diff --git a/zone/tune.cpp b/zone/tune.cpp index e4d730abc..22ca90375 100644 --- a/zone/tune.cpp +++ b/zone/tune.cpp @@ -249,9 +249,9 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh if (Msg){ - GM->Message(0, "######### Melee Mitigation Report: Start [Detail Level %i]#########", Msg); - GM->Message(0, "#ATTACKER: %s", attacker->GetCleanName()); - GM->Message(0, "#DEFENDER: %s", defender->GetCleanName()); + GM->Message(Chat::White, "######### Melee Mitigation Report: Start [Detail Level %i]#########", Msg); + GM->Message(Chat::White, "#ATTACKER: %s", attacker->GetCleanName()); + GM->Message(Chat::White, "#DEFENDER: %s", defender->GetCleanName()); } if (RuleB(Combat, UseIntervalAC)) { @@ -264,16 +264,16 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh float weight = 0.0; if (Msg >= 2){ - GM->Message(0, " "); - GM->Message(0, "### Calculate Mitigation Rating ###"); + GM->Message(Chat::White, " "); + GM->Message(Chat::White, "### Calculate Mitigation Rating ###"); if (aabonuses.CombatStability) - GM->Message(0, "# %i #### DEFENDER SE_CombatStability(259) AA Bonus", aabonuses.CombatStability); + GM->Message(Chat::White, "# %i #### DEFENDER SE_CombatStability(259) AA Bonus", aabonuses.CombatStability); if (spellbonuses.CombatStability) - GM->Message(0, "# %i #### DEFENDER SE_CombatStability(259) Spell Bonus", spellbonuses.CombatStability); + GM->Message(Chat::White, "# %i #### DEFENDER SE_CombatStability(259) Spell Bonus", spellbonuses.CombatStability); if (itembonuses.CombatStability) - GM->Message(0, "# %i #### DEFENDER SE_CombatStability(259) Worn Bonus", itembonuses.CombatStability); + GM->Message(Chat::White, "# %i #### DEFENDER SE_CombatStability(259) Worn Bonus", itembonuses.CombatStability); - GM->Message(0, "# %.2f #### DEFENDER Base Soft Cap", softcap); + GM->Message(Chat::White, "# %.2f #### DEFENDER Base Soft Cap", softcap); } float monkweight = RuleI(Combat, MonkACBonusWeight); @@ -287,11 +287,11 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh armor = ac_override; if (Msg >=2 ){ - GM->Message(0, "# %i #### DEFENDER AC Equiped/Worn Bonus", itembonuses.AC); - GM->Message(0, "# %i #### DEFENDER SE_ArmorClass(1) AA Bonus", aabonuses.AC); - GM->Message(0, "# %i #### DEFENDER SE_ArmorClass(1) Spell Bonus", spellbonuses.AC); - GM->Message(0, "# %i #### DEFENDER Shield AC", shield_ac); - GM->Message(0, "# %i #### DEFENDER Total Client Armor - NO shield", armor); + GM->Message(Chat::White, "# %i #### DEFENDER AC Equiped/Worn Bonus", itembonuses.AC); + GM->Message(Chat::White, "# %i #### DEFENDER SE_ArmorClass(1) AA Bonus", aabonuses.AC); + GM->Message(Chat::White, "# %i #### DEFENDER SE_ArmorClass(1) Spell Bonus", spellbonuses.AC); + GM->Message(Chat::White, "# %i #### DEFENDER Shield AC", shield_ac); + GM->Message(Chat::White, "# %i #### DEFENDER Total Client Armor - NO shield", armor); } } else if (IsNPC()) { @@ -301,9 +301,9 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh armor = ac_override; if (Msg >=2 ){ - GM->Message(0, "# %i #### DEFENDER AC Equiped/Worn Bonus", itembonuses.AC); - GM->Message(0, "# %i #### DEFENDER SE_ArmorClass(1) Spell Bonus", spellbonuses.AC); - GM->Message(0, "# %i #### DEFENDER NPC AC Stat", CastToNPC()->GetRawAC()); + GM->Message(Chat::White, "# %i #### DEFENDER AC Equiped/Worn Bonus", itembonuses.AC); + GM->Message(Chat::White, "# %i #### DEFENDER SE_ArmorClass(1) Spell Bonus", spellbonuses.AC); + GM->Message(Chat::White, "# %i #### DEFENDER NPC AC Stat", CastToNPC()->GetRawAC()); } int PetACBonus = 0; @@ -311,7 +311,7 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh if (!IsPet()){ armor = (armor / RuleR(Combat, NPCACFactor)); if (Msg >=2 ) - GM->Message(0, "# %i #### DEFENDER NPC Armor after RuleR(Combat, NPCACFactor) %.2f", armor, RuleR(Combat, NPCACFactor)); + GM->Message(Chat::White, "# %i #### DEFENDER NPC Armor after RuleR(Combat, NPCACFactor) %.2f", armor, RuleR(Combat, NPCACFactor)); } Mob *owner = nullptr; @@ -325,18 +325,18 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh if (Msg >=2 ){ if (owner->aabonuses.PetMeleeMitigation) - GM->Message(0, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) AA Bonus", owner->aabonuses.PetMeleeMitigation); + GM->Message(Chat::White, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) AA Bonus", owner->aabonuses.PetMeleeMitigation); if (owner->spellbonuses.PetMeleeMitigation) - GM->Message(0, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) Spell Bonus",owner->spellbonuses.PetMeleeMitigation); + GM->Message(Chat::White, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) Spell Bonus",owner->spellbonuses.PetMeleeMitigation); if (owner->itembonuses.PetMeleeMitigation) - GM->Message(0, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) Worn Bonus", owner->itembonuses.PetMeleeMitigation); + GM->Message(Chat::White, "# %i #### DEFENDER Pet Owner SE_PetMeleeMitigation(379) Worn Bonus", owner->itembonuses.PetMeleeMitigation); } } armor += spellbonuses.AC + itembonuses.AC + PetACBonus + 1; if (Msg >= 2) - GM->Message(0, "# %i #### DEFENDER NPC Total Base Armor",armor); + GM->Message(Chat::White, "# %i #### DEFENDER NPC Total Base Armor",armor); } if (opts) { @@ -405,38 +405,38 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh armor = softcap + softcap_armor; if (Msg >= 2) - GM->Message(0, "# %i #### DEFENDER Final Armor [Soft Cap %i Soft Cap Armor %i]",armor, softcap,softcap_armor); + GM->Message(Chat::White, "# %i #### DEFENDER Final Armor [Soft Cap %i Soft Cap Armor %i]",armor, softcap,softcap_armor); } int tmp_armor = armor; if (GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == NECROMANCER || GetClass() == ENCHANTER){ mitigation_rating = ((GetSkill(EQEmu::skills::SkillDefense) + itembonuses.HeroicAGI / 10) / 4.0) + armor + 1; if (Msg >= 2) - GM->Message(0, "# + %.2f #### DEFENDER Armor Bonus [Defense Skill %i Heroic Agi %i]", mitigation_rating - tmp_armor, GetSkill(EQEmu::skills::SkillDefense), itembonuses.HeroicAGI); + GM->Message(Chat::White, "# + %.2f #### DEFENDER Armor Bonus [Defense Skill %i Heroic Agi %i]", mitigation_rating - tmp_armor, GetSkill(EQEmu::skills::SkillDefense), itembonuses.HeroicAGI); } else{ mitigation_rating = ((GetSkill(EQEmu::skills::SkillDefense) + itembonuses.HeroicAGI / 10) / 3.0) + (armor * 1.333333) + 1; if (Msg >= 2) - GM->Message(0, "# + %.2f #### DEFENDER Armor Bonus [Defense Skill %i Heroic Agi %i]", mitigation_rating - tmp_armor, GetSkill(EQEmu::skills::SkillDefense), itembonuses.HeroicAGI); + GM->Message(Chat::White, "# + %.2f #### DEFENDER Armor Bonus [Defense Skill %i Heroic Agi %i]", mitigation_rating - tmp_armor, GetSkill(EQEmu::skills::SkillDefense), itembonuses.HeroicAGI); } mitigation_rating *= 0.847; if (Msg >= 1) - GM->Message(0, "# %.2f #### DEFENDER Final Mitigation Rating", mitigation_rating); + GM->Message(Chat::White, "# %.2f #### DEFENDER Final Mitigation Rating", mitigation_rating); if (Msg >= 2){ - GM->Message(0, " "); - GM->Message(0, "### Mitigation Bonus Effects ###"); + GM->Message(Chat::White, " "); + GM->Message(Chat::White, "### Mitigation Bonus Effects ###"); if (itembonuses.MeleeMitigation) - GM->Message(0, "# %i #### DEFENDER Item Mod2 Shielding", itembonuses.MeleeMitigation); + GM->Message(Chat::White, "# %i #### DEFENDER Item Mod2 Shielding", itembonuses.MeleeMitigation); if (aabonuses.MeleeMitigationEffect) - GM->Message(0, "# %i #### DEFENDER SE_MeleeMitigation(168) AA Bonus", aabonuses.MeleeMitigationEffect); + GM->Message(Chat::White, "# %i #### DEFENDER SE_MeleeMitigation(168) AA Bonus", aabonuses.MeleeMitigationEffect); if (spellbonuses.MeleeMitigationEffect) - GM->Message(0, "# %i #### DEFENDER SE_MeleeMitigation(168) Spell Bonus", spellbonuses.MeleeMitigationEffect); + GM->Message(Chat::White, "# %i #### DEFENDER SE_MeleeMitigation(168) Spell Bonus", spellbonuses.MeleeMitigationEffect); if (itembonuses.MeleeMitigationEffect) - GM->Message(0, "# %i #### DEFENDER SE_MeleeMitigation(168) Worn Bonus", itembonuses.MeleeMitigationEffect); + GM->Message(Chat::White, "# %i #### DEFENDER SE_MeleeMitigation(168) Worn Bonus", itembonuses.MeleeMitigationEffect); } mitigation_rating = mod_mitigation_rating(mitigation_rating, attacker); @@ -458,31 +458,31 @@ int32 Mob::Tune_MeleeMitigation(Mob* GM, Mob *attacker, int32 damage, int32 minh attack_rating = attacker->mod_attack_rating(attack_rating, this); if (Msg >= 2){ - GM->Message(0, " "); - GM->Message(0, "### Calculate Attack Rating ###"); + GM->Message(Chat::White, " "); + GM->Message(Chat::White, "### Calculate Attack Rating ###"); if (attacker->IsClient()){ - GM->Message(0, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK); - GM->Message(0, "# %i #### ATTACKER SE_ATK(2) AA Bonus", attacker->aabonuses.ATK); - GM->Message(0, "# %i #### ATTACKER SE_ATK(2) spell Bonus", attacker->spellbonuses.ATK); - GM->Message(0, "# %i #### ATTACKER Leadership Bonus", attacker->CastToClient()->GroupLeadershipAAOffenseEnhancement()); - GM->Message(0, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK); - GM->Message(0, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK); - GM->Message(0, "# %.2f #### ATTACKER Strength Stat ATK Bonus [Stat Amt: %i]", ((attacker->GetSTR()-66) * 0.9),attacker->GetSTR()); - GM->Message(0, "# %.2f #### ATTACKER Offensive Skill ATK Bonus [Stat Amt: %i]", (attacker->GetSkill(EQEmu::skills::SkillOffense)*1.345), attacker->GetSkill(EQEmu::skills::SkillOffense)); + GM->Message(Chat::White, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK); + GM->Message(Chat::White, "# %i #### ATTACKER SE_ATK(2) AA Bonus", attacker->aabonuses.ATK); + GM->Message(Chat::White, "# %i #### ATTACKER SE_ATK(2) spell Bonus", attacker->spellbonuses.ATK); + GM->Message(Chat::White, "# %i #### ATTACKER Leadership Bonus", attacker->CastToClient()->GroupLeadershipAAOffenseEnhancement()); + GM->Message(Chat::White, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK); + GM->Message(Chat::White, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK); + GM->Message(Chat::White, "# %.2f #### ATTACKER Strength Stat ATK Bonus [Stat Amt: %i]", ((attacker->GetSTR()-66) * 0.9),attacker->GetSTR()); + GM->Message(Chat::White, "# %.2f #### ATTACKER Offensive Skill ATK Bonus [Stat Amt: %i]", (attacker->GetSkill(EQEmu::skills::SkillOffense)*1.345), attacker->GetSkill(EQEmu::skills::SkillOffense)); } else{ - GM->Message(0, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK); - GM->Message(0, "# %i #### ATTACKER SE_ATK(2) spell Bonus", attacker->spellbonuses.ATK); - GM->Message(0, "# %i #### ATTACKER NPC ATK Stat", attacker->CastToNPC()->ATK); - GM->Message(0, "# %.2f #### ATTACKER Strength Stat ATK Bonus [Stat Amt: %i]", ((attacker->GetSTR()-66) * 0.9),attacker->GetSTR()); - GM->Message(0, "# %.2f #### ATTACKER Offensive Skill ATK Bonus [Stat Amt: %i]", (attacker->GetSkill(EQEmu::skills::SkillOffense)*1.345), attacker->GetSkill(EQEmu::skills::SkillOffense)); + GM->Message(Chat::White, "# %i #### ATTACKER Worn/Equip ATK Bonus", attacker->itembonuses.ATK); + GM->Message(Chat::White, "# %i #### ATTACKER SE_ATK(2) spell Bonus", attacker->spellbonuses.ATK); + GM->Message(Chat::White, "# %i #### ATTACKER NPC ATK Stat", attacker->CastToNPC()->ATK); + GM->Message(Chat::White, "# %.2f #### ATTACKER Strength Stat ATK Bonus [Stat Amt: %i]", ((attacker->GetSTR()-66) * 0.9),attacker->GetSTR()); + GM->Message(Chat::White, "# %.2f #### ATTACKER Offensive Skill ATK Bonus [Stat Amt: %i]", (attacker->GetSkill(EQEmu::skills::SkillOffense)*1.345), attacker->GetSkill(EQEmu::skills::SkillOffense)); } } if (Msg >= 1){ - GM->Message(0, "# %.2f #### ATTACKER Final Attack Rating", attack_rating); - GM->Message(0, "######### Melee Mitigation Report: Complete #########", Msg); + GM->Message(Chat::White, "# %.2f #### ATTACKER Final Attack Rating", attack_rating); + GM->Message(Chat::White, "######### Melee Mitigation Report: Complete #########", Msg); } diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index fb0a85490..bc9e3870d 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -70,7 +70,7 @@ void NPC::AI_SetRoambox(float distance, float max_x, float min_x, float max_y, f void NPC::DisplayWaypointInfo(Client *c) { - c->Message(0, "Mob is on grid %d, in spawn group %d, on waypoint %d/%d", + c->Message(Chat::White, "Mob is on grid %d, in spawn group %d, on waypoint %d/%d", GetGrid(), GetSp2(), GetCurWp(), @@ -81,7 +81,7 @@ void NPC::DisplayWaypointInfo(Client *c) { cur = Waypoints.begin(); end = Waypoints.end(); for (; cur != end; ++cur) { - c->Message(0, "Waypoint %d: (%.2f,%.2f,%.2f,%.2f) pause %d", + c->Message(Chat::White, "Waypoint %d: (%.2f,%.2f,%.2f,%.2f) pause %d", cur->index, cur->x, cur->y, @@ -895,7 +895,7 @@ void ZoneDatabase::AssignGrid(Client *client, int grid, int spawn2id) { return; } - client->Message(0, "Grid assign: spawn2 id = %d updated", spawn2id); + client->Message(Chat::White, "Grid assign: spawn2 id = %d updated", spawn2id); } diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 4d1399f68..2fc29e3b6 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -578,7 +578,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) printf("Zoning %s to %s(%u) - %u\n", client != nullptr ? client->GetCleanName() : "Unknown", szp->zone, database.GetZoneID(szp->zone), szp->instance_id); if (client != 0) { if (strcasecmp(szp->adminname, szp->name) == 0) - client->Message(0, "Zoning to: %s", szp->zone); + client->Message(Chat::White, "Zoning to: %s", szp->zone); else if (client->GetAnon() == 1 && client->Admin() > szp->adminrank) break; else { diff --git a/zone/zone.cpp b/zone/zone.cpp index d20b2934e..f364ab298 100755 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1770,14 +1770,14 @@ void Zone::SpawnStatus(Mob* client) { while(iterator.MoreElements()) { if (iterator.GetData()->timer.GetRemainingTime() == 0xFFFFFFFF) - client->Message(0, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ()); + client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ()); else - client->Message(0, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000); + client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000); x++; iterator.Advance(); } - client->Message(0, "%i spawns listed.", x); + client->Message(Chat::White, "%i spawns listed.", x); } void Zone::ShowEnabledSpawnStatus(Mob* client) @@ -1792,7 +1792,7 @@ void Zone::ShowEnabledSpawnStatus(Mob* client) { if (iterator.GetData()->timer.GetRemainingTime() != 0xFFFFFFFF) { - client->Message(0, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000); + client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000); iEnabledCount++; } @@ -1800,7 +1800,7 @@ void Zone::ShowEnabledSpawnStatus(Mob* client) iterator.Advance(); } - client->Message(0, "%i of %i spawns listed.", iEnabledCount, x); + client->Message(Chat::White, "%i of %i spawns listed.", iEnabledCount, x); } void Zone::ShowDisabledSpawnStatus(Mob* client) @@ -1815,7 +1815,7 @@ void Zone::ShowDisabledSpawnStatus(Mob* client) { if (iterator.GetData()->timer.GetRemainingTime() == 0xFFFFFFFF) { - client->Message(0, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ()); + client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ()); iDisabledCount++; } @@ -1823,7 +1823,7 @@ void Zone::ShowDisabledSpawnStatus(Mob* client) iterator.Advance(); } - client->Message(0, "%i of %i spawns listed.", iDisabledCount, x); + client->Message(Chat::White, "%i of %i spawns listed.", iDisabledCount, x); } void Zone::ShowSpawnStatusByID(Mob* client, uint32 spawnid) @@ -1839,9 +1839,9 @@ void Zone::ShowSpawnStatusByID(Mob* client, uint32 spawnid) if (iterator.GetData()->GetID() == spawnid) { if (iterator.GetData()->timer.GetRemainingTime() == 0xFFFFFFFF) - client->Message(0, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ()); + client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: disabled", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ()); else - client->Message(0, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000); + client->Message(Chat::White, " %d: %1.1f, %1.1f, %1.1f: %1.2f", iterator.GetData()->GetID(), iterator.GetData()->GetX(), iterator.GetData()->GetY(), iterator.GetData()->GetZ(), (float)iterator.GetData()->timer.GetRemainingTime() / 1000); iSpawnIDCount++; @@ -1853,9 +1853,9 @@ void Zone::ShowSpawnStatusByID(Mob* client, uint32 spawnid) } if(iSpawnIDCount > 0) - client->Message(0, "%i of %i spawns listed.", iSpawnIDCount, x); + client->Message(Chat::White, "%i of %i spawns listed.", iSpawnIDCount, x); else - client->Message(0, "No matching spawn id was found in this zone."); + client->Message(Chat::White, "No matching spawn id was found in this zone."); } bool ZoneDatabase::GetDecayTimes(npcDecayTimes_Struct *npcCorpseDecayTimes) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 7c90bcc11..91f456768 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -3544,10 +3544,10 @@ void ZoneDatabase::ListAllInstances(Client* client, uint32 charid) char name[64]; database.GetCharName(charid, name); - client->Message(0, "%s is part of the following instances:", name); + client->Message(Chat::White, "%s is part of the following instances:", name); for (auto row = results.begin(); row != results.end(); ++row) { - client->Message(0, "%s - id: %lu, version: %lu", database.GetZoneName(atoi(row[1])), + client->Message(Chat::White, "%s - id: %lu, version: %lu", database.GetZoneName(atoi(row[1])), (unsigned long)atoi(row[0]), (unsigned long)atoi(row[2])); } } diff --git a/zone/zoning.cpp b/zone/zoning.cpp index 5950d4025..800ee8cd2 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -814,7 +814,7 @@ bool Client::HasZoneFlag(uint32 zone_id) const { void Client::SendZoneFlagInfo(Client *to) const { if(zone_flags.empty()) { - to->Message(0, "%s has no zone flags.", GetName()); + to->Message(Chat::White, "%s has no zone flags.", GetName()); return; } @@ -823,7 +823,7 @@ void Client::SendZoneFlagInfo(Client *to) const { end = zone_flags.end(); char empty[1] = { '\0' }; - to->Message(0, "Flags for %s:", GetName()); + to->Message(Chat::White, "Flags for %s:", GetName()); for(; cur != end; ++cur) { uint32 zoneid = *cur; @@ -843,7 +843,7 @@ void Client::SendZoneFlagInfo(Client *to) const { strcpy(flag_name, "(ERROR GETTING NAME)"); } - to->Message(0, "Has Flag %s for zone %s (%d,%s)", flag_name, long_name, zoneid, short_name); + to->Message(Chat::White, "Has Flag %s for zone %s (%d,%s)", flag_name, long_name, zoneid, short_name); if(long_name != empty) delete[] long_name; }