[Constants] Convert string_id Defines to ClientString Namespace

This commit is contained in:
regneq 2025-09-01 15:11:46 -07:00
parent 1eb89edbbd
commit b54dfbac82
41 changed files with 1357 additions and 1351 deletions

View File

@ -1195,21 +1195,21 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
if (send_message_and_save) {
MessageString(
Chat::Yellow,
AA_IMPROVE,
ClientString::AA_IMPROVE,
std::to_string(rank->title_sid).c_str(),
std::to_string(rank->prev->current_value).c_str(),
std::to_string(cost).c_str(),
cost == 1 ? std::to_string(AA_POINT).c_str() : std::to_string(AA_POINTS).c_str()
cost == 1 ? std::to_string(ClientString::AA_POINT).c_str() : std::to_string(ClientString::AA_POINTS).c_str()
);
}
} else {
if (send_message_and_save) {
MessageString(
Chat::Yellow,
AA_GAIN_ABILITY,
ClientString::AA_GAIN_ABILITY,
std::to_string(rank->title_sid).c_str(),
std::to_string(cost).c_str(),
cost == 1 ? std::to_string(AA_POINT).c_str() : std::to_string(AA_POINTS).c_str()
cost == 1 ? std::to_string(ClientString::AA_POINT).c_str() : std::to_string(ClientString::AA_POINTS).c_str()
);
}
}
@ -1313,7 +1313,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
CommonBreakInvisible();
if (spells[rank->spell].sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
MessageString(Chat::SpellFailure, SNEAK_RESTRICT);
MessageString(Chat::SpellFailure, ClientString::SNEAK_RESTRICT);
return;
}
//
@ -1327,7 +1327,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
SetAppearance(eaStanding, false);
if (GetAppearance() != eaStanding) {
MessageString(Chat::SpellFailure, STAND_TO_CAST);
MessageString(Chat::SpellFailure, ClientString::STAND_TO_CAST);
return;
}
}
@ -2125,20 +2125,20 @@ void Client::AutoGrantAAPoints() {
if (rank->prev) {
MessageString(
Chat::Yellow,
AA_IMPROVE,
ClientString::AA_IMPROVE,
std::to_string(rank->title_sid).c_str(),
std::to_string(rank->prev->current_value).c_str(),
"0",
std::to_string(AA_POINTS).c_str()
std::to_string(ClientString::AA_POINTS).c_str()
);
}
else {
MessageString(
Chat::Yellow,
AA_GAIN_ABILITY,
ClientString::AA_GAIN_ABILITY,
std::to_string(rank->title_sid).c_str(),
"0",
std::to_string(AA_POINTS).c_str()
std::to_string(ClientString::AA_POINTS).c_str()
);
}
}

View File

@ -1503,7 +1503,7 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts, boo
this, /* Sender */
Chat::StrikeThrough, /* Type: 339 */
FilterStrikethrough, /* FilterType: 12 */
STRIKETHROUGH_STRING /* You strike through your opponent's defenses! */
ClientString::STRIKETHROUGH_STRING /* You strike through your opponent's defenses! */
);
hit.damage_done = 1; // set to one, we will check this to continue
@ -1529,14 +1529,14 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts, boo
this,
Chat::Stun,
FilterStuns,
AVOID_STUNNING_BLOW
ClientString::AVOID_STUNNING_BLOW
);
} else if (zone->random.Roll(stun_resist)) {
other->FilteredMessageString(
this,
Chat::Stun,
FilterStuns,
SHAKE_OFF_STUN
ClientString::SHAKE_OFF_STUN
);
} else {
other->Stun(3000); // yuck -- 3 seconds
@ -1598,7 +1598,7 @@ bool Mob::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
if (DivineAura() && !CastToClient()->GetGM()) { //cant attack while invulnerable unless your a gm
LogCombat("Attack cancelled, Divine Aura is in effect");
MessageString(Chat::DefaultText, DIVINE_AURA_NO_ATK);
MessageString(Chat::DefaultText, ClientString::DIVINE_AURA_NO_ATK);
return false;
}
@ -1856,7 +1856,7 @@ bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::Skil
false, /* Skip Sender */
RuleI(Range, DamageMessages),
Chat::NonMelee, /* 283 */
HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
ClientString::HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
killer_mob->GetCleanName(), /* Message1 */
GetCleanName(), /* Message2 */
ConvertArray(damage, val1)/* Message3 */
@ -2224,7 +2224,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
//Check that we can attack before we calc heading and face our target
if (!IsAttackAllowed(other)) {
if (GetOwnerID()) {
SayString(NOT_LEGAL_TARGET);
SayString(ClientString::NOT_LEGAL_TARGET);
}
if (other->IsClient()) {
@ -2464,7 +2464,7 @@ void NPC::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::SkillTyp
{
if (IsLDoNTrapped())
{
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
MessageString(Chat::Red, ClientString::LDON_ACCIDENT_SETOFF2);
SpellFinished(GetLDoNTrapSpellID(), other, EQ::spells::CastingSlot::Item, 0, -1, spells[GetLDoNTrapSpellID()].resist_difficulty, false);
SetLDoNTrapSpellID(0);
SetLDoNTrapped(false);
@ -2532,7 +2532,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
false, /* Skip Sender */
RuleI(Range, DamageMessages),
Chat::NonMelee, /* 283 */
HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
ClientString::HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
killer_mob->GetCleanName(), /* Message1 */
GetCleanName(), /* Message2 */
ConvertArray(damage, val1) /* Message3 */
@ -4158,7 +4158,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
pet->AddToHateList(attacker, 1, 0, true, false, false, spell_id);
pet->SetTarget(attacker);
MessageString(Chat::NPCQuestSay, PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
MessageString(Chat::NPCQuestSay, ClientString::PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
}
if (GetTempPetCount()) {
@ -4310,7 +4310,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
true, /* Skip Sender */
RuleI(Range, SpellMessages),
Chat::SpellWornOff, /* 284 */
HAS_BEEN_AWAKENED, // %1 has been awakened by %2.
ClientString::HAS_BEEN_AWAKENED, // %1 has been awakened by %2.
GetCleanName(), /* Message1 */
attacker->GetCleanName() /* Message2 */
);
@ -4442,7 +4442,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
this,
Chat::Stun,
FilterStuns,
SHAKE_OFF_STUN
ClientString::SHAKE_OFF_STUN
);
}
}
@ -4453,7 +4453,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
this,
Chat::Stun,
FilterStuns,
AVOID_STUNNING_BLOW
ClientString::AVOID_STUNNING_BLOW
);
}
}
@ -4568,7 +4568,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
if (FromDamageShield && damage > 0) {
//special crap for spell damage, looks hackish to me
char val1[20] = { 0 };
owner->MessageString(Chat::NonMelee, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
owner->MessageString(Chat::NonMelee, ClientString::OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
}
else {
if (damage > 0) {
@ -4613,7 +4613,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
if (owner && owner->CastToClient()->GetFilter(FilterDamageShields) != FilterHide) {
owner->MessageString(
Chat::DamageShield,
OTHER_HIT_NONMELEE,
ClientString::OTHER_HIT_NONMELEE,
GetCleanName(),
ConvertArray(damage, val1)
);
@ -4622,7 +4622,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
if (attacker->CastToClient()->GetFilter(FilterDamageShields) != FilterHide) {
attacker->MessageString(
Chat::DamageShield,
OTHER_HIT_NONMELEE,
ClientString::OTHER_HIT_NONMELEE,
GetCleanName(),
ConvertArray(damage, val1)
);
@ -4636,7 +4636,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
RuleI(Range, SpellMessages),
Chat::NonMelee, /* 283 */
FilterSpellDamage, /* FilterType: 13 */
HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
ClientString::HIT_NON_MELEE, /* %1 hit %2 for %3 points of non-melee damage. */
0,
attacker->GetCleanName(), /* Message1 */
GetCleanName(), /* Message2 */
@ -4758,13 +4758,13 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
//might filter on (attack_skill>200 && attack_skill<250), but I dont think we need it
if (!attacker->IsCorpse() && attacker->IsClient()) {
attacker->FilteredMessageString(attacker, Chat::DotDamage,
FilterDOT, YOUR_HIT_DOT, GetCleanName(), itoa(damage),
FilterDOT, ClientString::YOUR_HIT_DOT, GetCleanName(), itoa(damage),
spells[spell_id].name);
}
if (IsClient()) {
FilteredMessageString(this, Chat::DotDamage, FilterDOT,
YOU_TAKE_DOT, itoa(damage), attacker->GetCleanName(),
ClientString::YOU_TAKE_DOT, itoa(damage), attacker->GetCleanName(),
spells[spell_id].name);
}
@ -4775,7 +4775,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
RuleI(Range, SpellMessages),
Chat::DotDamage, /* Type: 325 */
FilterDOT, /* FilterType: 19 */
OTHER_HIT_DOT, /* MessageFormat: %1 has taken %2 damage from %3 by %4. */
ClientString::OTHER_HIT_DOT, /* MessageFormat: %1 has taken %2 damage from %3 by %4. */
attacker, /* sent above */
GetCleanName(), /* Message1 */
itoa(damage), /* Message2 */
@ -4813,45 +4813,45 @@ void Mob::HealDamage(uint64 amount, Mob* caster, uint16 spell_id)
if ((caster->IsClient() && caster == this)) {
if (caster->CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater) {
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
HOT_HEAL_SELF, itoa(acthealed), spells[spell_id].name);
ClientString::HOT_HEAL_SELF, itoa(acthealed), spells[spell_id].name);
}
else
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
YOU_HEALED, GetCleanName(), itoa(acthealed));
ClientString::YOU_HEALED, GetCleanName(), itoa(acthealed));
}
else if ((caster->IsClient() && caster != this)) {
if (caster->CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater)
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
HOT_HEAL_OTHER, GetCleanName(), itoa(acthealed),
ClientString::HOT_HEAL_OTHER, GetCleanName(), itoa(acthealed),
spells[spell_id].name);
else
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
YOU_HEAL, GetCleanName(), itoa(acthealed));
ClientString::YOU_HEAL, GetCleanName(), itoa(acthealed));
}
// message to target
if (IsClient() && caster != this) {
if (CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater)
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
HOT_HEALED_OTHER, caster->GetCleanName(),
ClientString::HOT_HEALED_OTHER, caster->GetCleanName(),
itoa(acthealed), spells[spell_id].name);
else
FilteredMessageString(this, Chat::NonMelee, FilterHealOverTime,
YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
ClientString::YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
}
}
else { // normal heals
// Message to caster
if (caster->IsClient()) {
caster->FilteredMessageString(caster, Chat::NonMelee,
FilterSpellDamage, YOU_HEAL, GetCleanName(),
FilterSpellDamage, ClientString::YOU_HEAL, GetCleanName(),
itoa(acthealed));
}
// Message to target
if (IsClient() && caster != this) {
FilteredMessageString(caster, Chat::NonMelee,
FilterSpellDamage, YOU_HEALED, caster->GetCleanName(),
FilterSpellDamage, ClientString::YOU_HEALED, caster->GetCleanName(),
itoa(acthealed));
}
}
@ -5067,10 +5067,10 @@ void Mob::TryWeaponProc(const EQ::ItemInstance *inst, const EQ::ItemData *weapon
if (IsPet()) {
Mob *own = GetOwner();
if (own)
own->MessageString(Chat::Red, PROC_PETTOOLOW);
own->MessageString(Chat::Red, ClientString::PROC_PETTOOLOW);
}
else {
MessageString(Chat::Red, PROC_TOOLOW);
MessageString(Chat::Red, ClientString::PROC_TOOLOW);
}
}
else {
@ -5102,10 +5102,10 @@ void Mob::TryWeaponProc(const EQ::ItemInstance *inst, const EQ::ItemData *weapon
if (IsPet()) {
Mob *own = GetOwner();
if (own)
own->MessageString(Chat::Red, PROC_PETTOOLOW);
own->MessageString(Chat::Red, ClientString::PROC_PETTOOLOW);
}
else {
MessageString(Chat::Red, PROC_TOOLOW);
MessageString(Chat::Red, ClientString::PROC_TOOLOW);
}
}
else {
@ -5344,7 +5344,7 @@ void Mob::TryPetCriticalHit(Mob *defender, DamageHitInfo &hit)
RuleI(Range, CriticalDamage),
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
ClientString::CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
0,
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
@ -5414,7 +5414,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
LogCombatDetail("Final Slayundead damage [{}]", hit.damage_done);
int slay_sex = GetGender() == Gender::Female ? FEMALE_SLAYUNDEAD : MALE_SLAYUNDEAD;
int slay_sex = GetGender() == Gender::Female ? ClientString::FEMALE_SLAYUNDEAD : ClientString::MALE_SLAYUNDEAD;
entity_list.FilteredMessageCloseString(
this, /* Sender */
@ -5514,7 +5514,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
RuleI(Range, CriticalDamage),
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
DEADLY_STRIKE, /* MessageFormat: %1 scores a Deadly Strike!(%2) */
ClientString::DEADLY_STRIKE, /* MessageFormat: %1 scores a Deadly Strike!(%2) */
0,
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
@ -5543,7 +5543,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
RuleI(Range, CriticalDamage),
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
CRIPPLING_BLOW, /* MessageFormat: %1 lands a Crippling Blow!(%2) */
ClientString::CRIPPLING_BLOW, /* MessageFormat: %1 lands a Crippling Blow!(%2) */
0,
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
@ -5558,7 +5558,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
true,
RuleI(Range, Emote),
Chat::Emote,
STAGGERS,
ClientString::STAGGERS,
GetName()
);
defender->Stun(RuleI(Combat, StunDuration));
@ -5573,7 +5573,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
RuleI(Range, CriticalDamage),
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
ClientString::CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
0,
GetCleanName(), /* Message1 */
itoa(hit.damage_done + hit.min_damage) /* Message2 */
@ -5633,7 +5633,7 @@ bool Mob::TryFinishingBlow(Mob *defender, int64 &damage)
RuleI(Range, CriticalDamage),
Chat::MeleeCrit, /* Type: 301 */
FilterMeleeCrits, /* FilterType: 12 */
FINISHING_BLOW, /* MessageFormat: %1 scores a Finishing Blow!!) */
ClientString::FINISHING_BLOW, /* MessageFormat: %1 scores a Finishing Blow!!) */
0,
GetCleanName() /* Message1 */
);
@ -5654,7 +5654,7 @@ void Mob::DoRiposte(Mob *defender)
// so ahhh the angle you can riposte is larger than the angle you can hit :P
if (!defender->IsFacingMob(this)) {
defender->MessageString(Chat::TooFarAway, CANT_SEE_TARGET);
defender->MessageString(Chat::TooFarAway, ClientString::CANT_SEE_TARGET);
return;
}
@ -6382,7 +6382,7 @@ void Mob::CommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraAttac
else if (GetClass() == Class::Ranger && GetLevel() >= RuleI(Combat, ArcheryBonusLevelRequirement)) { // no double dmg on headshot
if ((defender->IsNPC() && !defender->IsMoving() && !defender->IsRooted()) || !RuleB(Combat, ArcheryBonusRequiresStationary)) {
hit.damage_done *= 2;
MessageString(Chat::MeleeCrit, BOW_DOUBLE_DAMAGE);
MessageString(Chat::MeleeCrit, ClientString::BOW_DOUBLE_DAMAGE);
}
}
@ -6848,7 +6848,7 @@ void Client::DoAttackRounds(Mob *target, int hand, bool IsFromSpell)
if (zone->random.Roll(flurry_chance)) {
Attack(target, hand, false, false, IsFromSpell);
}
MessageString(Chat::NPCFlurry, YOU_FLURRY);
MessageString(Chat::NPCFlurry, ClientString::YOU_FLURRY);
}
}
}

View File

@ -1027,11 +1027,11 @@ void Mob::AddTrap(Aura *aura, AuraRecord &record)
bool Mob::CanSpawnAura(bool trap)
{
if (trap && !HasFreeTrapSlots()) {
MessageString(Chat::SpellFailure, NO_MORE_TRAPS);
MessageString(Chat::SpellFailure, ClientString::NO_MORE_TRAPS);
return false;
}
else if (!trap && !HasFreeAuraSlots()) {
MessageString(Chat::SpellFailure, NO_MORE_AURAS);
MessageString(Chat::SpellFailure, ClientString::NO_MORE_AURAS);
return false;
}

View File

@ -2932,7 +2932,7 @@ void Bot::DoAttackRounds(Mob* target, int hand) {
if (GetOwner()) {
GetOwner()->MessageString(
Chat::NPCFlurry,
NPC_FLURRY,
ClientString::NPC_FLURRY,
GetCleanName(),
target->GetCleanName()
);
@ -3454,11 +3454,11 @@ bool Bot::CheckIfIncapacitated() {
void Bot::SetBerserkState() {// Berserk updates should occur if primary AI criteria are met
if (GetClass() == Class::Warrior || GetClass() == Class::Berserker) {
if (!berserk && GetHPRatio() < RuleI(Combat, BerserkerFrenzyStart)) {
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_START, GetName());
entity_list.MessageCloseString(this, false, 200, 0, ClientString::BERSERK_START, GetName());
berserk = true;
}
if (berserk && GetHPRatio() > RuleI(Combat, BerserkerFrenzyEnd)) {
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_END, GetName());
entity_list.MessageCloseString(this, false, 200, 0, ClientString::BERSERK_END, GetName());
berserk = false;
}
}
@ -5101,7 +5101,7 @@ bool Bot::TryFinishingBlow(Mob *defender, int64 &damage)
if (defender->GetLevel() <= levelreq && (chance >= zone->random.Int(1, 1000))) {
LogCombat("Landed a finishing blow: levelreq at [{}] other level [{}]",
levelreq, defender->GetLevel());
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, FINISHING_BLOW, GetName());
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, ClientString::FINISHING_BLOW, GetName());
damage = fb_damage;
return true;
} else {
@ -5362,7 +5362,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
if (bo && bo->IsClient() && bo->CastToClient()->GetBotOption(Client::booMonkWuMessage)) {
bo->Message(
GENERIC_EMOTE,
ClientString::GENERIC_EMOTE,
"The spirit of Master Wu fills %s! %s gains %d additional attack(s).",
GetCleanName(),
GetCleanName(),
@ -5563,7 +5563,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
if (bo && bo->IsClient() && bo->CastToClient()->GetBotOption(Client::booMonkWuMessage)) {
bo->Message(
GENERIC_EMOTE,
ClientString::GENERIC_EMOTE,
"The spirit of Master Wu fills %s! %s gains %d additional attack(s).",
GetCleanName(),
GetCleanName(),
@ -5920,12 +5920,12 @@ bool Bot::CastSpell(
if (DivineAura()) {
LogSpellsDetail("Spell casting canceled: cannot cast while Divine Aura is in effect");
InterruptSpell(SPELL_FIZZLE, 0x121, false);
InterruptSpell(ClientString::SPELL_FIZZLE, 0x121, false);
return false;
}
if (slot < EQ::spells::CastingSlot::MaxGems && !CheckFizzle(spell_id)) {
int fizzle_msg = IsBardSong(spell_id) ? MISS_NOTE : SPELL_FIZZLE;
int fizzle_msg = IsBardSong(spell_id) ? ClientString::MISS_NOTE : ClientString::SPELL_FIZZLE;
InterruptSpell(fizzle_msg, 0x121, spell_id);
uint32 use_mana = ((spells[spell_id].mana) / 4);
@ -7191,7 +7191,7 @@ void Bot::ProcessBotGroupInvite(Client* c, std::string const& botName) {
}
}
} else if (invitedBot->HasGroup()) {
c->MessageString(Chat::LightGray, TARGET_ALREADY_IN_GROUP, invitedBot->GetCleanName());
c->MessageString(Chat::LightGray, ClientString::TARGET_ALREADY_IN_GROUP, invitedBot->GetCleanName());
}
}
}
@ -7931,7 +7931,7 @@ void Bot::RaidGroupSay(const char* msg, ...) {
if (r) {
for (const auto& m : r->members) {
if (m.member && m.member->IsClient()) {
m.member->FilteredMessageString(this,Chat::PetResponse,FilterSocials,GENERIC_SAY,GetCleanName(),buf);
m.member->FilteredMessageString(this,Chat::PetResponse,FilterSocials, ClientString::GENERIC_SAY,GetCleanName(),buf);
}
}
}
@ -7939,12 +7939,12 @@ void Bot::RaidGroupSay(const char* msg, ...) {
else if (HasGroup()) {
for (auto& m : GetGroup()->members) {
if (m && m->IsClient()) {
m->FilteredMessageString(this,Chat::PetResponse,FilterSocials,GENERIC_SAY,GetCleanName(),buf);
m->FilteredMessageString(this,Chat::PetResponse,FilterSocials, ClientString::GENERIC_SAY,GetCleanName(),buf);
}
}
}
else if (GetOwner()) {
GetOwner()->FilteredMessageString(this,Chat::PetResponse,FilterSocials,GENERIC_SAY,GetCleanName(),buf);
GetOwner()->FilteredMessageString(this,Chat::PetResponse,FilterSocials, ClientString::GENERIC_SAY,GetCleanName(),buf);
}
}
@ -13369,7 +13369,7 @@ bool Bot::IsImmuneToBotSpell(uint16 spell_id, Mob* caster) {
if (IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false)) {
LogSpells("Clients cannot fear eachother!");
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, ClientString::IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
return true;
}
else if (GetLevel() > spells[spell_id].max_value[effect_index] && spells[spell_id].max_value[effect_index] != 0) {

View File

@ -190,7 +190,7 @@ void bot_command_inventory_remove(Client* c, const Seperator* sep)
int ab_mask = (ActionableBots::ABM_Target | ActionableBots::ABM_ByName);
if (c->GetTradeskillObject() || (c->trade->state == Trading)) {
c->MessageString(Chat::Tell, MERCHANT_BUSY);
c->MessageString(Chat::Tell, ClientString::MERCHANT_BUSY);
return;
}

View File

@ -34,7 +34,7 @@ void bot_command_pet_get_lost(Client *c, const Seperator *sep)
if (!bot_iter->GetPet() || bot_iter->GetPet()->IsCharmed())
continue;
bot_iter->GetPet()->SayString(PET_GETLOST_STRING);
bot_iter->GetPet()->SayString(ClientString::PET_GETLOST_STRING);
bot_iter->GetPet()->Depop(false);
bot_iter->SetPetID(0);
database.botdb.DeletePetItems(bot_iter->GetBotID());
@ -80,7 +80,7 @@ void bot_command_pet_remove(Client *c, const Seperator *sep)
}
if (bot_iter->GetPet()) {
bot_iter->GetPet()->SayString(PET_GETLOST_STRING);
bot_iter->GetPet()->SayString(ClientString::PET_GETLOST_STRING);
bot_iter->GetPet()->Depop(false);
bot_iter->SetPetID(0);
}

View File

@ -154,7 +154,7 @@ void Bot::ProcessRaidInvite(Mob* invitee, Client* invitor, bool group_invite) {
Raid* raid = entity_list.GetRaidByClient(invitor);
if (raid && raid->RaidCount() >= MAX_RAID_MEMBERS) {
invitor->MessageString(Chat::Red, RAID_IS_FULL);
invitor->MessageString(Chat::Red, ClientString::RAID_IS_FULL);
return;
}
Bot::CreateBotRaid(invitee, invitor, group_invite, raid);

View File

@ -1361,9 +1361,9 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
{
case ChatChannel_Guild: { /* Guild Chat */
if (!IsInAGuild()) {
MessageString(Chat::DefaultText, GUILD_NOT_MEMBER2); //You are not a member of any guild.
MessageString(Chat::DefaultText, ClientString::GUILD_NOT_MEMBER2); //You are not a member of any guild.
} else if (!guild_mgr.CheckPermission(GuildID(), GuildRank(), GUILD_ACTION_GUILD_CHAT_SPEAK_IN)) {
MessageString(Chat::EchoGuild, NO_PROPER_ACCESS);
MessageString(Chat::EchoGuild, ClientString::NO_PROPER_ACCESS);
} else if (!worldserver.SendChannelMessage(this, targetname, chan_num, GuildID(), language, lang_skill, message)) {
Message(Chat::White, "Error: World server disconnected");
}
@ -2090,7 +2090,7 @@ void Client::IncreaseLanguageSkill(uint8 language_id, uint8 increase)
QueuePacket(outapp);
safe_delete(outapp);
MessageString(Chat::Skills, LANG_SKILL_IMPROVED);
MessageString(Chat::Skills, ClientString::LANG_SKILL_IMPROVED);
}
void Client::AddSkill(EQ::skills::SkillType skillid, uint16 value) {
@ -3323,7 +3323,7 @@ void Client::SetPVP(bool toggle, bool message) {
if (message) {
if(GetPVP()) {
MessageString(Chat::Shout, PVP_ON);
MessageString(Chat::Shout, ClientString::PVP_ON);
} else {
Message(Chat::Shout, "You now follow the ways of Order.");
}
@ -3454,22 +3454,22 @@ void Client::Disarm(Client* disarmer, int chance) {
if (matslot != EQ::textures::materialInvalid)
SendWearChange(matslot);
}
MessageString(Chat::Skills, DISARMED);
MessageString(Chat::Skills, ClientString::DISARMED);
if (disarmer != this)
disarmer->MessageString(Chat::Skills, DISARM_SUCCESS, GetCleanName());
disarmer->MessageString(Chat::Skills, ClientString::DISARM_SUCCESS, GetCleanName());
if (chance != 1000)
disarmer->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 4);
CalcBonuses();
// CalcEnduranceWeightFactor();
return;
}
disarmer->MessageString(Chat::Skills, DISARM_FAILED);
disarmer->MessageString(Chat::Skills, ClientString::DISARM_FAILED);
if (chance != 1000)
disarmer->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 2);
return;
}
}
disarmer->MessageString(Chat::Skills, DISARM_FAILED);
disarmer->MessageString(Chat::Skills, ClientString::DISARM_FAILED);
}
bool Client::BindWound(Mob *bindmob, bool start, bool fail)
@ -3512,7 +3512,7 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
// send bindmob "stand still"
if (!bindmob->IsAIControlled() && bindmob != this) {
bindmob->CastToClient()->MessageString(Chat::Yellow,
YOU_ARE_BEING_BANDAGED);
ClientString::YOU_ARE_BEING_BANDAGED);
} else if (bindmob->IsAIControlled() && bindmob != this) {
; // Tell IPC to stand still?
} else {
@ -4010,7 +4010,7 @@ void Client::Tell_StringID(uint32 string_id, const char *who, const char *messag
char string_id_str[10];
snprintf(string_id_str, 10, "%d", string_id);
MessageString(Chat::EchoTell, TELL_QUEUED_MESSAGE, who, string_id_str, message);
MessageString(Chat::EchoTell, ClientString::TELL_QUEUED_MESSAGE, who, string_id_str, message);
}
void Client::SetTint(int16 in_slot, uint32 color) {
@ -4080,7 +4080,7 @@ void Client::SetLanguageSkill(uint8 language_id, uint8 language_skill)
QueuePacket(outapp);
safe_delete(outapp);
MessageString(Chat::Skills, LANG_SKILL_IMPROVED);
MessageString(Chat::Skills, ClientString::LANG_SKILL_IMPROVED);
}
void Client::LinkDead()
@ -4170,7 +4170,7 @@ void Client::Escape()
{
entity_list.RemoveFromTargets(this, true);
SetInvisible(Invisibility::Invisible);
MessageString(Chat::Skills, ESCAPE);
MessageString(Chat::Skills, ClientString::ESCAPE);
}
float Client::CalcClassicPriceMod(Mob* other, bool reverse) {
@ -4383,13 +4383,13 @@ void Client::SacrificeConfirm(Mob *caster)
}
if (GetLevel() < RuleI(Spells, SacrificeMinLevel)) {
caster->MessageString(Chat::Red, SAC_TOO_LOW); // This being is not a worthy sacrifice.
caster->MessageString(Chat::Red, ClientString::SAC_TOO_LOW); // This being is not a worthy sacrifice.
safe_delete(outapp);
return;
}
if (GetLevel() > RuleI(Spells, SacrificeMaxLevel)) {
caster->MessageString(Chat::Red, SAC_TOO_HIGH);
caster->MessageString(Chat::Red, ClientString::SAC_TOO_HIGH);
safe_delete(outapp);
return;
}
@ -4461,7 +4461,7 @@ void Client::Sacrifice(Mob *caster)
}
}
} else {
caster->MessageString(Chat::Red, SAC_TOO_LOW); // This being is not a worthy sacrifice.
caster->MessageString(Chat::Red, ClientString::SAC_TOO_LOW); // This being is not a worthy sacrifice.
}
}
@ -5679,7 +5679,7 @@ void Client::HandleLDoNOpen(NPC *target)
{
if(target->GetLDoNTrapSpellID() != 0)
{
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
MessageString(Chat::Red, ClientString::LDON_ACCIDENT_SETOFF2);
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQ::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].resist_difficulty);
target->SetLDoNTrapSpellID(0);
target->SetLDoNTrapped(false);
@ -5695,7 +5695,7 @@ void Client::HandleLDoNOpen(NPC *target)
if(target->IsLDoNLocked())
{
MessageString(Chat::Skills, LDON_STILL_LOCKED, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_STILL_LOCKED, target->GetCleanName());
return;
}
else
@ -5729,13 +5729,13 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
{
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
{
MessageString(Chat::Skills, LDON_CANT_DETERMINE_TRAP, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_CANT_DETERMINE_TRAP, target->GetCleanName());
return;
}
if(target->IsLDoNTrapDetected())
{
MessageString(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_CERTAIN_TRAP, target->GetCleanName());
}
else
{
@ -5744,10 +5744,10 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
{
case -1:
case 0:
MessageString(Chat::Skills, LDON_DONT_KNOW_TRAPPED, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_DONT_KNOW_TRAPPED, target->GetCleanName());
break;
case 1:
MessageString(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_CERTAIN_TRAP, target->GetCleanName());
target->SetLDoNTrapDetected(true);
break;
default:
@ -5757,7 +5757,7 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
}
else
{
MessageString(Chat::Skills, LDON_CERTAIN_NOT_TRAP, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_CERTAIN_NOT_TRAP, target->GetCleanName());
}
}
}
@ -5770,13 +5770,13 @@ void Client::HandleLDoNDisarm(NPC *target, uint16 skill, uint8 type)
{
if(!target->IsLDoNTrapped())
{
MessageString(Chat::Skills, LDON_WAS_NOT_TRAPPED, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_WAS_NOT_TRAPPED, target->GetCleanName());
return;
}
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
{
MessageString(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_HAVE_NOT_DISARMED, target->GetCleanName());
return;
}
@ -5795,13 +5795,13 @@ void Client::HandleLDoNDisarm(NPC *target, uint16 skill, uint8 type)
target->SetLDoNTrapDetected(false);
target->SetLDoNTrapped(false);
target->SetLDoNTrapSpellID(0);
MessageString(Chat::Skills, LDON_HAVE_DISARMED, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_HAVE_DISARMED, target->GetCleanName());
break;
case 0:
MessageString(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_HAVE_NOT_DISARMED, target->GetCleanName());
break;
case -1:
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
MessageString(Chat::Red, ClientString::LDON_ACCIDENT_SETOFF2);
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQ::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].resist_difficulty);
target->SetLDoNTrapSpellID(0);
target->SetLDoNTrapped(false);
@ -5820,7 +5820,7 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
{
if(target->IsLDoNTrapped())
{
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
MessageString(Chat::Red, ClientString::LDON_ACCIDENT_SETOFF2);
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQ::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].resist_difficulty);
target->SetLDoNTrapSpellID(0);
target->SetLDoNTrapped(false);
@ -5829,7 +5829,7 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
if(!target->IsLDoNLocked())
{
MessageString(Chat::Skills, LDON_WAS_NOT_LOCKED, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_WAS_NOT_LOCKED, target->GetCleanName());
return;
}
@ -5845,11 +5845,11 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
{
case 0:
case -1:
MessageString(Chat::Skills, LDON_PICKLOCK_FAILURE, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_PICKLOCK_FAILURE, target->GetCleanName());
break;
case 1:
target->SetLDoNLocked(false);
MessageString(Chat::Skills, LDON_PICKLOCK_SUCCESS, target->GetCleanName());
MessageString(Chat::Skills, ClientString::LDON_PICKLOCK_SUCCESS, target->GetCleanName());
break;
}
}
@ -6409,7 +6409,7 @@ void Client::SuspendMinion(int value)
CurrentPet->SetTaunting(m_suspendedminion.taunting);
MessageString(Chat::Magenta, SUSPEND_MINION_UNSUSPEND, CurrentPet->GetCleanName());
MessageString(Chat::Magenta, ClientString::SUSPEND_MINION_UNSUSPEND, CurrentPet->GetCleanName());
memset(&m_suspendedminion, 0, sizeof(struct PetInfo));
// TODO: These pet command states need to be synced ...
@ -6440,19 +6440,19 @@ void Client::SuspendMinion(int value)
{
if(m_suspendedminion.SpellID > 0)
{
MessageString(Chat::Red,ONLY_ONE_PET);
MessageString(Chat::Red, ClientString::ONLY_ONE_PET);
return;
}
else if(CurrentPet->IsEngaged())
{
MessageString(Chat::Red,SUSPEND_MINION_FIGHTING);
MessageString(Chat::Red, ClientString::SUSPEND_MINION_FIGHTING);
return;
}
else if(entity_list.Fighting(CurrentPet))
{
MessageString(Chat::Blue,SUSPEND_MINION_HAS_AGGRO);
MessageString(Chat::Blue, ClientString::SUSPEND_MINION_HAS_AGGRO);
}
else
{
@ -6469,7 +6469,7 @@ void Client::SuspendMinion(int value)
else
strn0cpy(m_suspendedminion.Name, CurrentPet->GetName(), 64); // Name stays even at rank 1
MessageString(Chat::Magenta, SUSPEND_MINION_SUSPEND, CurrentPet->GetCleanName());
MessageString(Chat::Magenta, ClientString::SUSPEND_MINION_SUSPEND, CurrentPet->GetCleanName());
CurrentPet->Depop(false);
@ -6478,7 +6478,7 @@ void Client::SuspendMinion(int value)
}
else
{
MessageString(Chat::Red, ONLY_SUMMONED_PETS);
MessageString(Chat::Red, ClientString::ONLY_SUMMONED_PETS);
return;
}
@ -6504,7 +6504,7 @@ void Client::AddEbonCrystals(uint32 amount, bool is_reclaim) {
MessageString(
Chat::Yellow,
YOU_RECEIVE,
ClientString::YOU_RECEIVE,
fmt::format(
"{} {}",
amount,
@ -6531,7 +6531,7 @@ void Client::AddRadiantCrystals(uint32 amount, bool is_reclaim) {
MessageString(
Chat::Yellow,
YOU_RECEIVE,
ClientString::YOU_RECEIVE,
fmt::format(
"{} {}",
amount,
@ -7034,16 +7034,16 @@ void Client::LocateCorpse()
if(ClosestCorpse)
{
MessageString(Chat::Spells, SENSE_CORPSE_DIRECTION);
MessageString(Chat::Spells, ClientString::SENSE_CORPSE_DIRECTION);
SetHeading(CalculateHeadingToTarget(ClosestCorpse->GetX(), ClosestCorpse->GetY()));
SetTarget(ClosestCorpse);
SendTargetCommand(ClosestCorpse->GetID());
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
}
else if(!GetTarget())
MessageString(Chat::Red, SENSE_CORPSE_NONE);
MessageString(Chat::Red, ClientString::SENSE_CORPSE_NONE);
else
MessageString(Chat::Red, SENSE_CORPSE_NOT_NAME);
MessageString(Chat::Red, ClientString::SENSE_CORPSE_NOT_NAME);
}
void Client::NPCSpawn(NPC *target_npc, const char *identifier, uint32 extra)
@ -7121,7 +7121,7 @@ void Client::DragCorpses()
if (!corpse || !corpse->IsPlayerCorpse() ||
corpse->CastToCorpse()->IsBeingLooted() ||
!corpse->CastToCorpse()->Summon(this, false, false)) {
MessageString(Chat::DefaultText, CORPSEDRAG_STOP);
MessageString(Chat::DefaultText, ClientString::CORPSEDRAG_STOP);
It = DraggedCorpses.erase(It);
if (It == DraggedCorpses.end())
break;
@ -7132,10 +7132,10 @@ void Client::DragCorpses()
void Client::ConsentCorpses(std::string consent_name, bool deny)
{
if (strcasecmp(consent_name.c_str(), GetName()) == 0) {
MessageString(Chat::Red, CONSENT_YOURSELF);
MessageString(Chat::Red, ClientString::CONSENT_YOURSELF);
}
else if (!consent_throttle_timer.Check()) {
MessageString(Chat::Red, CONSENT_WAIT);
MessageString(Chat::Red, ClientString::CONSENT_WAIT);
}
else {
auto pack = new ServerPacket(ServerOP_Consent, sizeof(ServerOP_Consent_Struct));
@ -8076,7 +8076,7 @@ void Client::DuplicateLoreMessage(uint32 ItemID)
{
if (!(m_ClientVersionBit & EQ::versions::maskRoFAndLater))
{
MessageString(Chat::White, PICK_LORE);
MessageString(Chat::White, ClientString::PICK_LORE);
return;
}
@ -8085,7 +8085,7 @@ void Client::DuplicateLoreMessage(uint32 ItemID)
if(!item)
return;
MessageString(Chat::White, PICK_LORE, item->Name);
MessageString(Chat::White, ClientString::PICK_LORE, item->Name);
}
void Client::GarbleMessage(char *message, uint8 variance)
@ -8442,23 +8442,23 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
}
// If no primary faction or biggest influence is your faction hit
if (primaryfaction <= 0 || lowestvalue == tmpFactionValue) {
merchant->SayString(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS6));
merchant->SayString(zone->random.Int(ClientString::WONT_SELL_DEEDS1, ClientString::WONT_SELL_DEEDS6));
} else if (lowestvalue == fmod.race_mod) { // race biggest
// Non-standard race (ex. illusioned to wolf)
if (!IsPlayerRace(GetRace())) {
messageid = zone->random.Int(1, 3); // these aren't sequential StringIDs :(
switch (messageid) {
case 1:
messageid = WONT_SELL_NONSTDRACE1;
messageid = ClientString::WONT_SELL_NONSTDRACE1;
break;
case 2:
messageid = WONT_SELL_NONSTDRACE2;
messageid = ClientString::WONT_SELL_NONSTDRACE2;
break;
case 3:
messageid = WONT_SELL_NONSTDRACE3;
messageid = ClientString::WONT_SELL_NONSTDRACE3;
break;
default: // w/e should never happen
messageid = WONT_SELL_NONSTDRACE1;
messageid = ClientString::WONT_SELL_NONSTDRACE1;
break;
}
merchant->SayString(messageid);
@ -8466,30 +8466,30 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
messageid = zone->random.Int(1, 4);
switch (messageid) {
case 1:
messageid = WONT_SELL_RACE1;
messageid = ClientString::WONT_SELL_RACE1;
break;
case 2:
messageid = WONT_SELL_RACE2;
messageid = ClientString::WONT_SELL_RACE2;
break;
case 3:
messageid = WONT_SELL_RACE3;
messageid = ClientString::WONT_SELL_RACE3;
break;
case 4:
messageid = WONT_SELL_RACE4;
messageid = ClientString::WONT_SELL_RACE4;
break;
default: // w/e should never happen
messageid = WONT_SELL_RACE1;
messageid = ClientString::WONT_SELL_RACE1;
break;
}
merchant->SayString(messageid, itoa(GetRace()));
}
} else if (lowestvalue == fmod.class_mod) {
merchant->SayString(zone->random.Int(WONT_SELL_CLASS1, WONT_SELL_CLASS5), itoa(GetClass()));
merchant->SayString(zone->random.Int(ClientString::WONT_SELL_CLASS1, ClientString::WONT_SELL_CLASS5), itoa(GetClass()));
} else {
// Must be deity - these two sound the best for that.
// Can't use a message with a field, GUI wants class/race names.
// for those message IDs. These are straight text.
merchant->SayString(zone->random.Int(WONT_SELL_DEEDS1, WONT_SELL_DEEDS2));
merchant->SayString(zone->random.Int(ClientString::WONT_SELL_DEEDS1, ClientString::WONT_SELL_DEEDS2));
}
return;
}
@ -8526,13 +8526,13 @@ void Client::SendFactionMessage(int32 tmpvalue, int32 faction_id, int32 faction_
if (tmpvalue == 0 || temp == 1 || temp == 2) {
return;
} else if (faction_value >= this_faction_max) {
MessageString(Chat::Yellow, FACTION_BEST, name);
MessageString(Chat::Yellow, ClientString::FACTION_BEST, name);
} else if (faction_value <= this_faction_min) {
MessageString(Chat::Yellow, FACTION_WORST, name);
MessageString(Chat::Yellow, ClientString::FACTION_WORST, name);
} else if (tmpvalue > 0 && !RuleB(Client, UseLiveFactionMessage)) {
MessageString(Chat::Yellow, FACTION_BETTER, name);
MessageString(Chat::Yellow, ClientString::FACTION_BETTER, name);
} else if (tmpvalue < 0 && !RuleB(Client, UseLiveFactionMessage)) {
MessageString(Chat::Yellow, FACTION_WORSE, name);
MessageString(Chat::Yellow, ClientString::FACTION_WORSE, name);
} else if (RuleB(Client, UseLiveFactionMessage)) {
Message(
Chat::Yellow,
@ -8834,7 +8834,7 @@ void Client::Consume(const EQ::ItemData *item, uint8 type, int16 slot, bool auto
DeleteItemInInventory(slot, 1);
if (!auto_consume) // no message if the client consumed for us
entity_list.MessageCloseString(this, true, 50, 0, EATING_MESSAGE, GetName(), item->Name);
entity_list.MessageCloseString(this, true, 50, 0, ClientString::EATING_MESSAGE, GetName(), item->Name);
LogFood("Eating from slot: [{}]", (int)slot);
@ -8846,7 +8846,7 @@ void Client::Consume(const EQ::ItemData *item, uint8 type, int16 slot, bool auto
LogFood("Consuming drink, points added to thirst_level: [{}] current_thirst: [{}]", increase, m_pp.thirst_level);
if (!auto_consume) // no message if the client consumed for us
entity_list.MessageCloseString(this, true, 50, 0, DRINKING_MESSAGE, GetName(), item->Name);
entity_list.MessageCloseString(this, true, 50, 0, ClientString::DRINKING_MESSAGE, GetName(), item->Name);
LogFood("Drinking from slot: [{}]", (int)slot);
}
@ -10388,13 +10388,13 @@ void Client::DzListTimers()
{
found = true;
auto time = lockout.GetTimeRemainingStrs();
MessageString(Chat::Yellow, DZ_TIMER, time.days.c_str(), time.hours.c_str(), time.mins.c_str(), lockout.DzName().c_str());
MessageString(Chat::Yellow, ClientString::DZ_TIMER, time.days.c_str(), time.hours.c_str(), time.mins.c_str(), lockout.DzName().c_str());
}
}
if (!found)
{
MessageString(Chat::Yellow, DZ_NO_TIMERS);
MessageString(Chat::Yellow, ClientString::DZ_NO_TIMERS);
}
}
@ -10590,7 +10590,7 @@ void Client::MovePCDynamicZone(uint32 zone_id, int zone_version, bool msg_if_inv
{
if (msg_if_invalid)
{
MessageString(Chat::Red, DZ_WAY_IS_BLOCKED); // unconfirmed message
MessageString(Chat::Red, ClientString::DZ_WAY_IS_BLOCKED); // unconfirmed message
}
}
else if (client_dzs.size() == 1)
@ -11909,11 +11909,11 @@ void Client::AddAAPoints(uint32 points)
}
if (points == 1 && m_pp.aapoints == 1) {
MessageString(Chat::Yellow, GAIN_SINGLE_AA_SINGLE_AA, fmt::format_int(m_pp.aapoints).c_str());
MessageString(Chat::Yellow, ClientString::GAIN_SINGLE_AA_SINGLE_AA, fmt::format_int(m_pp.aapoints).c_str());
} else if (points == 1 && m_pp.aapoints > 1) {
MessageString(Chat::Yellow, GAIN_SINGLE_AA_MULTI_AA, fmt::format_int(m_pp.aapoints).c_str());
MessageString(Chat::Yellow, ClientString::GAIN_SINGLE_AA_MULTI_AA, fmt::format_int(m_pp.aapoints).c_str());
} else {
MessageString(Chat::Yellow, GAIN_MULTI_AA_MULTI_AA, fmt::format_int(points).c_str(), fmt::format_int(m_pp.aapoints).c_str());
MessageString(Chat::Yellow, ClientString::GAIN_MULTI_AA_MULTI_AA, fmt::format_int(points).c_str(), fmt::format_int(m_pp.aapoints).c_str());
}
SendAlternateAdvancementStats();
@ -13102,10 +13102,10 @@ void Client::SetAAEXPPercentage(uint8 percentage)
const uint32 before_percentage = m_epp.perAA;
if (before_percentage > 0 && percentage == 0) {
MessageString(Chat::White, AA_OFF);
MessageString(Chat::White, ClientString::AA_OFF);
}
else if (before_percentage == 0 && percentage > 0) {
MessageString(Chat::White, AA_ON);
MessageString(Chat::White, ClientString::AA_ON);
}
m_epp.perAA = EQ::Clamp(static_cast<int>(percentage), 0, 100);

View File

@ -396,7 +396,7 @@ bool Client::DoEvolveCheckProgression(EQ::ItemInstance &inst)
e.status = "Evolved Item due to obtaining progression - New Evolve Item placed in inventory.";
RecordPlayerEventLog(PlayerEvent::EVOLVE_ITEM, e);
MessageString(Chat::Yellow, EVOLVE_ITEM_EVOLVED, inst.GetItem()->Name);
MessageString(Chat::Yellow, ClientString::EVOLVE_ITEM_EVOLVED, inst.GetItem()->Name);
LogEvolveItem(
"Evolved item id <red>[{}] into item id <green>[{}] for Character ID <green>[{}]",

File diff suppressed because it is too large Load Diff

View File

@ -237,11 +237,11 @@ bool Client::Process() {
}
if (song_target == nullptr) {
InterruptSpell(SONG_ENDS_ABRUPTLY, 0x121, bardsong);
InterruptSpell(ClientString::SONG_ENDS_ABRUPTLY, 0x121, bardsong);
}
else {
if (!ApplyBardPulse(bardsong, song_target, bardsong_slot)) {
InterruptSpell(SONG_ENDS_ABRUPTLY, 0x121, bardsong);
InterruptSpell(ClientString::SONG_ENDS_ABRUPTLY, 0x121, bardsong);
}
}
}
@ -357,7 +357,7 @@ bool Client::Process() {
if (AutoFireEnabled()) {
if (GetTarget() == this) {
MessageString(Chat::TooFarAway, TRY_ATTACKING_SOMEONE);
MessageString(Chat::TooFarAway, ClientString::TRY_ATTACKING_SOMEONE);
auto_fire = false;
}
EQ::ItemInstance *ranged = GetInv().GetItem(EQ::invslot::slotRange);
@ -436,10 +436,10 @@ bool Client::Process() {
}
if (!CombatRange(auto_attack_target)) {
MessageString(Chat::TooFarAway, TARGET_TOO_FAR);
MessageString(Chat::TooFarAway, ClientString::TARGET_TOO_FAR);
}
else if (auto_attack_target == this) {
MessageString(Chat::TooFarAway, TRY_ATTACKING_SOMEONE);
MessageString(Chat::TooFarAway, ClientString::TRY_ATTACKING_SOMEONE);
}
else if (!los_status || !los_status_facing) {
//you can't see your target
@ -464,11 +464,11 @@ bool Client::Process() {
if (GetClass() == Class::Warrior || GetClass() == Class::Berserker) {
if (!dead && !IsBerserk() && GetHPRatio() < RuleI(Combat, BerserkerFrenzyStart)) {
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_START, GetName());
entity_list.MessageCloseString(this, false, 200, 0, ClientString::BERSERK_START, GetName());
berserk = true;
}
if (IsBerserk() && GetHPRatio() > RuleI(Combat, BerserkerFrenzyEnd)) {
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_END, GetName());
entity_list.MessageCloseString(this, false, 200, 0, ClientString::BERSERK_END, GetName());
berserk = false;
}
}
@ -1004,12 +1004,12 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
//this resets the slot
zone->tmpmerchanttable[npcid] = temporary_merchant_list;
if (npc && handy_item) {
int greet_id = zone->random.Int(MERCHANT_GREETING, MERCHANT_HANDY_ITEM4);
int greet_id = zone->random.Int(ClientString::MERCHANT_GREETING, ClientString::MERCHANT_HANDY_ITEM4);
auto handy_id = std::to_string(greet_id);
if (greet_id != MERCHANT_GREETING) {
MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, npc->GetCleanName(), handy_id.c_str(), GetName(), handy_item->Name);
if (greet_id != ClientString::MERCHANT_GREETING) {
MessageString(Chat::NPCQuestSay, ClientString::GENERIC_STRINGID_SAY, npc->GetCleanName(), handy_id.c_str(), GetName(), handy_item->Name);
} else {
MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, npc->GetCleanName(), handy_id.c_str(), GetName());
MessageString(Chat::NPCQuestSay, ClientString::GENERIC_STRINGID_SAY, npc->GetCleanName(), handy_id.c_str(), GetName());
}
}
}
@ -1145,7 +1145,7 @@ void Client::OPTGB(const EQApplicationPacket *app)
uint32 tgb_flag = *(uint32 *)app->pBuffer;
if(tgb_flag == 2)
MessageString(Chat::White, TGB() ? TGB_ON : TGB_OFF);
MessageString(Chat::White, TGB() ? ClientString::TGB_ON : ClientString::TGB_OFF);
else
tgb = tgb_flag;
}
@ -1184,7 +1184,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
) {
MessageString(
Chat::Red,
SPELL_LEVEL_TO_LOW,
ClientString::SPELL_LEVEL_TO_LOW,
std::to_string(spells[m->spell_id].classes[GetClass() - 1]).c_str(),
spells[m->spell_id].name
);
@ -1203,7 +1203,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
RuleB(Character, RestrictSpellScribing) &&
!item->IsEquipable(GetRace(), GetClass())
) {
MessageString(Chat::Red, CANNOT_USE_ITEM);
MessageString(Chat::Red, ClientString::CANNOT_USE_ITEM);
break;
}
@ -1792,14 +1792,14 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
case EQ::skills::SkillJewelryMaking:
case EQ::skills::SkillPottery:
if(skilllevel >= RuleI(Skills, MaxTrainTradeskills)) {
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, ClientString::MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
SetSkill(skill, skilllevel);
return;
}
break;
case EQ::skills::SkillResearch:
if(skilllevel >= RuleI(Skills, MaxTrainResearch)) {
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, ClientString::MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
SetSkill(skill, skilllevel);
return;
}
@ -1810,7 +1810,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
case EQ::skills::SkillSpecializeDivination:
case EQ::skills::SkillSpecializeEvocation:
if(skilllevel >= RuleI(Skills, MaxTrainSpecializations)) {
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, ClientString::MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
SetSkill(skill, skilllevel);
return;
}
@ -1822,7 +1822,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
if (skilllevel >= MaxSkillValue)
{
// Don't allow training over max skill level
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, ClientString::MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
SetSkill(skill, skilllevel);
return;
}
@ -1833,7 +1833,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
if (skilllevel >= MaxSpecSkill)
{
// Restrict specialization training to follow the rules
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
MessageString(Chat::Red, ClientString::MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
SetSkill(skill, skilllevel);
return;
}
@ -2087,7 +2087,7 @@ void Client::DoTracking()
auto *m = entity_list.GetMob(TrackingID);
if (!m || m->IsCorpse()) {
MessageString(Chat::Skills, TRACK_LOST_TARGET);
MessageString(Chat::Skills, ClientString::TRACK_LOST_TARGET);
TrackingID = 0;
return;
}
@ -2111,23 +2111,23 @@ void Client::DoTracking()
}
if (relative_heading > 480) {
MessageString(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
MessageString(Chat::Skills, ClientString::TRACK_STRAIGHT_AHEAD, m->GetCleanName());
} else if (relative_heading > 416) {
MessageString(Chat::Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "left");
MessageString(Chat::Skills, ClientString::TRACK_AHEAD_AND_TO, m->GetCleanName(), "left");
} else if (relative_heading > 352) {
MessageString(Chat::Skills, TRACK_TO_THE, m->GetCleanName(), "left");
MessageString(Chat::Skills, ClientString::TRACK_TO_THE, m->GetCleanName(), "left");
} else if (relative_heading > 288) {
MessageString(Chat::Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "left");
MessageString(Chat::Skills, ClientString::TRACK_BEHIND_AND_TO, m->GetCleanName(), "left");
} else if (relative_heading > 224) {
MessageString(Chat::Skills, TRACK_BEHIND_YOU, m->GetCleanName());
MessageString(Chat::Skills, ClientString::TRACK_BEHIND_YOU, m->GetCleanName());
} else if (relative_heading > 160) {
MessageString(Chat::Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "right");
MessageString(Chat::Skills, ClientString::TRACK_BEHIND_AND_TO, m->GetCleanName(), "right");
} else if (relative_heading > 96) {
MessageString(Chat::Skills, TRACK_TO_THE, m->GetCleanName(), "right");
MessageString(Chat::Skills, ClientString::TRACK_TO_THE, m->GetCleanName(), "right");
} else if (relative_heading > 32) {
MessageString(Chat::Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "right");
MessageString(Chat::Skills, ClientString::TRACK_AHEAD_AND_TO, m->GetCleanName(), "right");
} else if (relative_heading >= 0) {
MessageString(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
MessageString(Chat::Skills, ClientString::TRACK_STRAIGHT_AHEAD, m->GetCleanName());
}
}

View File

@ -1525,7 +1525,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
if (c && inst) {
if (c->CheckLoreConflict(item)) {
c->MessageString(Chat::White, LOOT_LORE_ERROR);
c->MessageString(Chat::White, ClientString::LOOT_LORE_ERROR);
c->QueuePacket(app);
SendEndLootErrorPacket(c);
ResetLooter();
@ -1538,7 +1538,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
EQ::ItemInstance *itm = inst->GetAugment(i);
if (itm) {
if (c->CheckLoreConflict(itm->GetItem())) {
c->MessageString(Chat::White, LOOT_LORE_ERROR);
c->MessageString(Chat::White, ClientString::LOOT_LORE_ERROR);
c->QueuePacket(app);
SendEndLootErrorPacket(c);
ResetLooter();
@ -1625,7 +1625,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
if (dz && !dz->CanClientLootCorpse(c, GetNPCTypeID(), GetID())) {
prevent_loot = true;
// note on live this message is only sent once on the first loot attempt of an open corpse
c->MessageString(Chat::Loot, LOOT_NOT_ALLOWED, inst->GetItem()->Name);
c->MessageString(Chat::Loot, ClientString::LOOT_NOT_ALLOWED, inst->GetItem()->Name);
}
}
@ -1737,14 +1737,14 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
linker.GenerateLink();
c->MessageString(Chat::Loot, LOOTED_MESSAGE, linker.Link().c_str());
c->MessageString(Chat::Loot, ClientString::LOOTED_MESSAGE, linker.Link().c_str());
if (!IsPlayerCorpse()) {
Group *g = c->GetGroup();
if (g != nullptr) {
g->GroupMessageString(
c, Chat::Loot,
OTHER_LOOTED_MESSAGE,
ClientString::OTHER_LOOTED_MESSAGE,
c->GetName(),
linker.Link().c_str()
);
@ -1755,7 +1755,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
r->RaidMessageString(
c,
Chat::Loot,
OTHER_LOOTED_MESSAGE,
ClientString::OTHER_LOOTED_MESSAGE,
c->GetName(),
linker.Link().c_str()
);
@ -1961,7 +1961,7 @@ bool Corpse::Summon(Client *c, bool spell, bool CheckDistance)
m_is_corpse_changed = true;
}
else {
c->MessageString(Chat::Red, CORPSE_TOO_FAR);
c->MessageString(Chat::Red, ClientString::CORPSE_TOO_FAR);
return false;
}
}
@ -1998,12 +1998,12 @@ bool Corpse::Summon(Client *c, bool spell, bool CheckDistance)
m_is_corpse_changed = true;
}
else {
c->MessageString(Chat::Red, CORPSE_TOO_FAR);
c->MessageString(Chat::Red, ClientString::CORPSE_TOO_FAR);
return false;
}
}
else {
c->MessageString(Chat::Red, CONSENT_DENIED);
c->MessageString(Chat::Red, ClientString::CONSENT_DENIED);
return false;
}
}
@ -2312,7 +2312,7 @@ void Corpse::CastRezz(uint16 spell_id, Mob *caster)
// refresh rezzed state from database
const auto &e = CharacterCorpsesRepository::FindOne(database, m_corpse_db_id);
if (!e.id) {
caster->MessageString(Chat::White, REZZ_ALREADY_PENDING);
caster->MessageString(Chat::White, ClientString::REZZ_ALREADY_PENDING);
return;
}
@ -2325,8 +2325,8 @@ void Corpse::CastRezz(uint16 spell_id, Mob *caster)
if (!IsRezzable()) {
if (caster && caster->IsClient()) {
if (!caster->CastToClient()->GetGM()) {
caster->MessageString(Chat::White, REZZ_ALREADY_PENDING);
caster->MessageString(Chat::White, CORPSE_TOO_OLD);
caster->MessageString(Chat::White, ClientString::REZZ_ALREADY_PENDING);
caster->MessageString(Chat::White, ClientString::CORPSE_TOO_OLD);
return;
}

View File

@ -200,7 +200,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
if (RuleI(Adventure, ItemIDToEnablePorts) != 0) {
if (!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) {
if (sender->GetInv().HasItem(RuleI(Adventure, ItemIDToEnablePorts)) == INVALID_INDEX) {
sender->MessageString(Chat::Red, DUNGEON_SEALED);
sender->MessageString(Chat::Red, ClientString::DUNGEON_SEALED);
safe_delete(outapp);
return;
}
@ -297,7 +297,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
sender->GetCleanName(),
z->flag_needed
);
sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
sender->MessageString(Chat::LightBlue, ClientString::DOORS_LOCKED);
} else {
sender->Message(Chat::White, "Your GM flag allows you to use this door.");
}
@ -374,7 +374,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
* GM can always open locks
*/
if (sender->GetGM()) {
sender->MessageString(Chat::LightBlue, DOORS_GM);
sender->MessageString(Chat::LightBlue, ClientString::DOORS_GM);
if (!IsDoorOpen() || (m_open_type == 58)) {
move_door_packet->action = static_cast<uint8>(m_invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
@ -437,7 +437,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
sender->CheckIncreaseSkill(EQ::skills::SkillPickLock, nullptr, 1);
move_door_packet->action = static_cast<uint8>(m_invert_state == 0 ? OPEN_DOOR
: OPEN_INVDOOR);
sender->MessageString(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
sender->MessageString(Chat::LightBlue, ClientString::DOORS_SUCCESSFUL_PICK);
}
else {
move_door_packet->action = static_cast<uint8>(m_invert_state == 0 ? CLOSE_DOOR
@ -445,19 +445,19 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
}
}
else {
sender->MessageString(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
sender->MessageString(Chat::LightBlue, ClientString::DOORS_INSUFFICIENT_SKILL);
safe_delete(outapp);
return;
}
}
else {
sender->MessageString(Chat::LightBlue, DOORS_NO_PICK);
sender->MessageString(Chat::LightBlue, ClientString::DOORS_NO_PICK);
safe_delete(outapp);
return;
}
}
else {
sender->MessageString(Chat::LightBlue, DOORS_CANT_PICK);
sender->MessageString(Chat::LightBlue, ClientString::DOORS_CANT_PICK);
safe_delete(outapp);
return;
}
@ -482,7 +482,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
}
}
else {
sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
sender->MessageString(Chat::LightBlue, ClientString::DOORS_LOCKED);
safe_delete(outapp);
return;
}

View File

@ -85,7 +85,7 @@ DynamicZone* DynamicZone::TryCreate(Client& client, DynamicZone& dzinfo, bool si
{
// live uses this message when trying to enter an instance that isn't ready
// for now we can use it as a client error message if instance creation fails
client.MessageString(Chat::Red, DZ_PREVENT_ENTERING);
client.MessageString(Chat::Red, ClientString::DZ_PREVENT_ENTERING);
LogDynamicZones("Failed to create dynamic zone for zone [{}]", dzinfo.GetZoneID());
return nullptr;
}
@ -96,7 +96,7 @@ DynamicZone* DynamicZone::TryCreate(Client& client, DynamicZone& dzinfo, bool si
dz->SaveMembers(request.GetMembers());
dz->SaveLockouts(request.GetLockouts());
dz->SendLeaderMessage(request.GetLeaderClient(), Chat::System, DZ_AVAILABLE, { dz->GetName() });
dz->SendLeaderMessage(request.GetLeaderClient(), Chat::System, ClientString::DZ_AVAILABLE, { dz->GetName() });
if (dz->GetMemberCount() < request.GetMembers().size())
{
dz->SendLeaderMessage(request.GetLeaderClient(), Chat::System, fmt::format(DzNotAllAdded,
@ -276,7 +276,7 @@ void DynamicZone::SendClientInvite(Client* client, const std::string& inviter, c
LogExpeditions("Invite [{}] to [{}] by [{}] swap [{}]", client->GetName(), GetID(), inviter, swap_name);
client->SetPendingDzInvite({ GetID(), inviter, swap_name });
client->MessageString(Chat::System, DZ_INVITED, GetLeaderName().c_str(), GetName().c_str());
client->MessageString(Chat::System, ClientString::DZ_INVITED, GetLeaderName().c_str(), GetName().c_str());
// live (as of March 11 2020 patch) warns for lockouts added during current
// expedition that client would receive upon entering (sent in invite packet)
@ -311,13 +311,13 @@ bool DynamicZone::ConfirmLeaderCommand(Client* client)
if (!GetLeader().IsValid())
{
client->MessageString(Chat::Red, DZ_NO_LEADER_INFO); // unconfirmed message
client->MessageString(Chat::Red, ClientString::DZ_NO_LEADER_INFO); // unconfirmed message
return false;
}
if (GetLeaderID() != client->CharacterID())
{
client->MessageString(Chat::System, DZ_NOT_LEADER, GetLeaderName().c_str());
client->MessageString(Chat::System, ClientString::DZ_NOT_LEADER, GetLeaderName().c_str());
return false;
}
@ -345,14 +345,14 @@ bool DynamicZone::ProcessAddConflicts(Client* leader, Client* client, bool swapp
if (IsCurrentZoneDz())
{
SendLeaderMessage(leader, Chat::Red, DZADD_LEAVE_ZONE, { client->GetName() });
SendLeaderMessage(leader, Chat::Red, ClientString::DZADD_LEAVE_ZONE, { client->GetName() });
has_conflict = true;
}
auto dz_id = client->GetExpeditionID();
if (dz_id)
{
int string_id = dz_id == GetID() ? DZADD_ALREADY_PART : DZADD_ALREADY_OTHER;
int string_id = dz_id == GetID() ? ClientString::DZADD_ALREADY_PART : ClientString::DZADD_ALREADY_OTHER;
SendLeaderMessage(leader, Chat::Red, string_id, { client->GetName() });
has_conflict = true;
}
@ -367,14 +367,14 @@ bool DynamicZone::ProcessAddConflicts(Client* leader, Client* client, bool swapp
has_conflict = true;
auto time = lockout.GetTimeRemainingStrs();
SendLeaderMessage(leader, Chat::Red, DZADD_REPLAY_TIMER, { client->GetName(), time.days, time.hours, time.mins });
SendLeaderMessage(leader, Chat::Red, ClientString::DZADD_REPLAY_TIMER, { client->GetName(), time.days, time.hours, time.mins });
}
else if (!lockout.IsReplay() && !HasLockout(lockout.Event()))
{
has_conflict = true;
auto time = lockout.GetTimeRemainingStrs();
SendLeaderMessage(leader, Chat::Red, DZADD_EVENT_TIMER, { client->GetName(), lockout.Event(), time.days, time.hours, time.mins });
SendLeaderMessage(leader, Chat::Red, ClientString::DZADD_EVENT_TIMER, { client->GetName(), lockout.Event(), time.days, time.hours, time.mins });
}
}
@ -388,7 +388,7 @@ bool DynamicZone::ProcessAddConflicts(Client* leader, Client* client, bool swapp
}
else if (member_count >= GetMaxPlayers())
{
SendLeaderMessage(leader, Chat::Red, DZADD_EXCEED_MAX, { fmt::format_int(GetMaxPlayers()).str() });
SendLeaderMessage(leader, Chat::Red, ClientString::DZADD_EXCEED_MAX, { fmt::format_int(GetMaxPlayers()).str() });
has_conflict = true;
}
}
@ -396,7 +396,7 @@ bool DynamicZone::ProcessAddConflicts(Client* leader, Client* client, bool swapp
auto invite_id = client->GetPendingDzInviteID();
if (invite_id)
{
int string_id = invite_id == GetID() ? DZADD_PENDING : DZADD_PENDING_OTHER;
int string_id = invite_id == GetID() ? ClientString::DZADD_PENDING : ClientString::DZADD_PENDING_OTHER;
SendLeaderMessage(leader, Chat::Red, string_id, { client->GetName() });
has_conflict = true;
}
@ -423,13 +423,13 @@ void DynamicZone::TryAddClient(Client* client, const std::string& inviter, const
if (!has_conflicts)
{
// live uses the original unsanitized input string in invite messages
uint32_t string_id = swap_name.empty() ? DZADD_INVITE : DZSWAP_INVITE;
uint32_t string_id = swap_name.empty() ? ClientString::DZADD_INVITE : ClientString::DZSWAP_INVITE;
SendLeaderMessage(leader, Chat::Yellow, string_id, { client->GetName() });
SendClientInvite(client, inviter, swap_name);
}
else if (swap_name.empty()) // swap command doesn't result in this message
{
SendLeaderMessage(leader, Chat::Red, DZADD_INVITE_FAIL, { client->GetName() });
SendLeaderMessage(leader, Chat::Red, ClientString::DZADD_INVITE_FAIL, { client->GetName() });
}
}
@ -444,12 +444,12 @@ void DynamicZone::DzAddPlayer(Client* client, const std::string& add_name, const
if (IsLocked())
{
client->MessageString(Chat::Red, DZADD_NOT_ALLOWING);
client->MessageString(Chat::Red, ClientString::DZADD_NOT_ALLOWING);
invite_failed = true;
}
else if (add_name.empty())
{
client->MessageString(Chat::Red, DZADD_NOT_ONLINE, add_name.c_str());
client->MessageString(Chat::Red, ClientString::DZADD_NOT_ONLINE, add_name.c_str());
invite_failed = true;
}
else
@ -460,11 +460,11 @@ void DynamicZone::DzAddPlayer(Client* client, const std::string& add_name, const
// live prioritizes offline message before already a member message
if (member_data.status == DynamicZoneMemberStatus::Offline)
{
client->MessageString(Chat::Red, DZADD_NOT_ONLINE, add_name.c_str());
client->MessageString(Chat::Red, ClientString::DZADD_NOT_ONLINE, add_name.c_str());
}
else
{
client->MessageString(Chat::Red, DZADD_ALREADY_PART, add_name.c_str());
client->MessageString(Chat::Red, ClientString::DZADD_ALREADY_PART, add_name.c_str());
}
invite_failed = true;
}
@ -472,7 +472,7 @@ void DynamicZone::DzAddPlayer(Client* client, const std::string& add_name, const
if (invite_failed)
{
client->MessageString(Chat::Red, DZADD_INVITE_FAIL, FormatName(add_name).c_str());
client->MessageString(Chat::Red, ClientString::DZADD_INVITE_FAIL, FormatName(add_name).c_str());
return;
}
@ -512,7 +512,7 @@ void DynamicZone::DzInviteResponse(Client* client, bool accepted, const std::str
if (!accepted)
{
SendLeaderMessage(leader, Chat::Red, DZ_INVITE_DECLINED, { client->GetName() });
SendLeaderMessage(leader, Chat::Red, ClientString::DZ_INVITE_DECLINED, { client->GetName() });
return;
}
@ -521,7 +521,7 @@ void DynamicZone::DzInviteResponse(Client* client, bool accepted, const std::str
if (IsLocked())
{
SendLeaderMessage(leader, Chat::Red, DZADD_NOT_ALLOWING);
SendLeaderMessage(leader, Chat::Red, ClientString::DZADD_NOT_ALLOWING);
}
else
{
@ -540,11 +540,11 @@ void DynamicZone::DzInviteResponse(Client* client, bool accepted, const std::str
if (has_conflicts)
{
SendLeaderMessage(leader, Chat::Red, DZ_INVITE_ERROR, { client->GetName() });
SendLeaderMessage(leader, Chat::Red, ClientString::DZ_INVITE_ERROR, { client->GetName() });
}
else
{
SendLeaderMessage(leader, Chat::Yellow, DZ_INVITE_ACCEPTED, { client->GetName() });
SendLeaderMessage(leader, Chat::Yellow, ClientString::DZ_INVITE_ACCEPTED, { client->GetName() });
// replay timers are optionally added to new members on join with fresh expire time
if (m_add_replay)
@ -563,7 +563,7 @@ void DynamicZone::DzInviteResponse(Client* client, bool accepted, const std::str
bool success = is_swap ? SwapMember(add_member, swap_name) : AddMember(add_member);
if (success)
{
SendLeaderMessage(leader, Chat::Yellow, DZ_ADDED, { client->GetName(), GetName() });
SendLeaderMessage(leader, Chat::Yellow, ClientString::DZ_ADDED, { client->GetName(), GetName() });
}
}
}
@ -577,7 +577,7 @@ void DynamicZone::DzMakeLeader(Client* client, std::string leader_name)
if (leader_name.empty())
{
client->MessageString(Chat::Red, DZ_LEADER_OFFLINE, leader_name.c_str());
client->MessageString(Chat::Red, ClientString::DZ_LEADER_OFFLINE, leader_name.c_str());
return;
}
@ -598,11 +598,11 @@ void DynamicZone::DzRemovePlayer(Client* client, std::string name)
bool removed = RemoveMember(name);
if (!removed)
{
client->MessageString(Chat::Red, DZ_NOT_MEMBER, FormatName(name).c_str());
client->MessageString(Chat::Red, ClientString::DZ_NOT_MEMBER, FormatName(name).c_str());
}
else
{
client->MessageString(Chat::Yellow, DZ_REMOVED, FormatName(name).c_str(), m_name.c_str());
client->MessageString(Chat::Yellow, ClientString::DZ_REMOVED, FormatName(name).c_str(), m_name.c_str());
}
}
@ -623,7 +623,7 @@ void DynamicZone::DzSwapPlayer(Client* client, std::string rem_name, std::string
if (rem_name.empty() || !HasMember(rem_name))
{
client->MessageString(Chat::Red, DZSWAP_CANNOT_REMOVE, FormatName(rem_name).c_str());
client->MessageString(Chat::Red, ClientString::DZSWAP_CANNOT_REMOVE, FormatName(rem_name).c_str());
return;
}
@ -634,7 +634,7 @@ void DynamicZone::DzPlayerList(Client* client)
{
if (client)
{
client->MessageString(Chat::Yellow, DZ_LEADER, GetLeaderName().c_str());
client->MessageString(Chat::Yellow, ClientString::DZ_LEADER, GetLeaderName().c_str());
std::vector<std::string> names;
for (const auto& member : m_members)
@ -642,7 +642,7 @@ void DynamicZone::DzPlayerList(Client* client)
names.push_back(member.name);
}
client->MessageString(Chat::Yellow, DZ_MEMBERS, fmt::format("{}", fmt::join(names, ", ")).c_str());
client->MessageString(Chat::Yellow, ClientString::DZ_MEMBERS, fmt::format("{}", fmt::join(names, ", ")).c_str());
}
}
@ -654,7 +654,7 @@ void DynamicZone::DzKickPlayers(Client* client)
}
RemoveAllMembers();
client->MessageString(Chat::Red, DZ_REMOVED, "Everyone", m_name.c_str());
client->MessageString(Chat::Red, ClientString::DZ_REMOVED, "Everyone", m_name.c_str());
}
void DynamicZone::HandleWorldMessage(ServerPacket* pack)
@ -697,8 +697,8 @@ void DynamicZone::HandleWorldMessage(ServerPacket* pack)
else if (Client* leader = entity_list.GetClientByName(buf->requester_name))
{
std::string target_name = FormatName(buf->target_name);
leader->MessageString(Chat::Red, DZADD_NOT_ONLINE, target_name.c_str());
leader->MessageString(Chat::Red, DZADD_INVITE_FAIL, target_name.c_str());
leader->MessageString(Chat::Red, ClientString::DZADD_NOT_ONLINE, target_name.c_str());
leader->MessageString(Chat::Red, ClientString::DZADD_INVITE_FAIL, target_name.c_str());
}
break;
}
@ -710,11 +710,11 @@ void DynamicZone::HandleWorldMessage(ServerPacket* pack)
// success flag is set by world to indicate new leader set to an online member
if (old_leader && buf->is_success)
{
old_leader->MessageString(Chat::Yellow, DZ_LEADER_NAME, buf->new_leader_name);
old_leader->MessageString(Chat::Yellow, ClientString::DZ_LEADER_NAME, buf->new_leader_name);
}
else if (old_leader)
{
uint32_t str_id = buf->is_online ? DZ_NOT_MEMBER : DZ_LEADER_OFFLINE;
uint32_t str_id = buf->is_online ? ClientString::DZ_NOT_MEMBER : ClientString::DZ_LEADER_OFFLINE;
old_leader->MessageString(Chat::Red, str_id, buf->new_leader_name);
}
@ -722,7 +722,7 @@ void DynamicZone::HandleWorldMessage(ServerPacket* pack)
{
if (auto new_leader = entity_list.GetClientByName(buf->new_leader_name))
{
new_leader->MessageString(Chat::Yellow, DZ_LEADER_YOU);
new_leader->MessageString(Chat::Yellow, ClientString::DZ_LEADER_YOU);
}
}
break;
@ -1127,7 +1127,7 @@ void DynamicZone::SendLeaderNameToZoneMembers()
if (member.id == m_leader.id && RuleB(Expedition, AlwaysNotifyNewLeaderOnChange))
{
member_client->MessageString(Chat::Yellow, DZ_LEADER_YOU);
member_client->MessageString(Chat::Yellow, ClientString::DZ_LEADER_YOU);
}
}
}
@ -1145,7 +1145,7 @@ void DynamicZone::SendMembersExpireWarning(uint32_t minutes)
client->QueuePacket(outapp.get());
// live doesn't actually send the chat message with it
client->MessageString(Chat::Yellow, DZ_MINUTES_REMAIN, fmt::format_int(minutes).c_str());
client->MessageString(Chat::Yellow, ClientString::DZ_MINUTES_REMAIN, fmt::format_int(minutes).c_str());
}
}
}
@ -1247,7 +1247,7 @@ void DynamicZone::SendUpdatesToZoneMembers(bool removing_all, bool silent)
if (m_type == DynamicZoneType::Expedition && removing_all && !silent)
{
client->MessageString(Chat::Yellow, DZ_REMOVED, client->GetCleanName(), GetName().c_str());
client->MessageString(Chat::Yellow, ClientString::DZ_REMOVED, client->GetCleanName(), GetName().c_str());
}
}
}
@ -1274,7 +1274,7 @@ void DynamicZone::ProcessMemberAddRemove(const DynamicZoneMember& member, bool r
{
// sending clear info also clears member list for removed members
client->QueuePacket(CreateInfoPacket(removed).get());
client->MessageString(Chat::Yellow, removed ? DZ_REMOVED : DZ_ADDED, client->GetCleanName(), GetName().c_str());
client->MessageString(Chat::Yellow, removed ? ClientString::DZ_REMOVED : ClientString::DZ_ADDED, client->GetCleanName(), GetName().c_str());
}
}

View File

@ -151,10 +151,10 @@ int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) {
entity_list.FilteredMessageCloseString(
this, true, 100, Chat::SpellCrit, FilterSpellCrits,
OTHER_CRIT_BLAST, nullptr, GetName(), itoa(-value));
ClientString::OTHER_CRIT_BLAST, nullptr, GetName(), itoa(-value));
if (IsClient()) {
MessageString(Chat::SpellCrit, YOU_CRIT_BLAST, itoa(-value));
MessageString(Chat::SpellCrit, ClientString::YOU_CRIT_BLAST, itoa(-value));
}
return value;
@ -506,10 +506,10 @@ int64 Mob::GetActSpellHealing(uint16 spell_id, int64 value, Mob* target, bool fr
if (critical_modifier > 1) {
entity_list.MessageCloseString(
this, true, 100, Chat::SpellCrit,
OTHER_CRIT_HEAL, GetName(), itoa(value));
ClientString::OTHER_CRIT_HEAL, GetName(), itoa(value));
if (IsClient()) {
MessageString(Chat::SpellCrit, YOU_CRIT_HEAL, itoa(value));
MessageString(Chat::SpellCrit, ClientString::YOU_CRIT_HEAL, itoa(value));
}
}
@ -861,7 +861,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
IsPet())
{
if (IsAmnesiad()) {
MessageString(Chat::Red, MELEE_SILENCE);
MessageString(Chat::Red, ClientString::MELEE_SILENCE);
}
return false;
}
@ -895,7 +895,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
}
if(level_to_use > GetLevel()) {
MessageString(Chat::Red, DISC_LEVEL_USE_ERROR);
MessageString(Chat::Red, ClientString::DISC_LEVEL_USE_ERROR);
//should summon them a new one...
return false;
}
@ -907,7 +907,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
// sneak attack discs require you to be hidden for 4 seconds before use
if (spell.sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
MessageString(Chat::SpellFailure, SNEAK_RESTRICT);
MessageString(Chat::SpellFailure, ClientString::SNEAK_RESTRICT);
return false;
}

View File

@ -1829,9 +1829,9 @@ void EntityList::DuelMessage(Mob *winner, Mob *loser, bool flee)
//might want some sort of distance check in here?
if (cur != winner && cur != loser) {
if (flee)
cur->MessageString(Chat::Yellow, DUEL_FLED, winner->GetName(),loser->GetName(),loser->GetName());
cur->MessageString(Chat::Yellow, ClientString::DUEL_FLED, winner->GetName(),loser->GetName(),loser->GetName());
else
cur->MessageString(Chat::Yellow, DUEL_FINISHED, winner->GetName(),loser->GetName());
cur->MessageString(Chat::Yellow, ClientString::DUEL_FINISHED, winner->GetName(),loser->GetName());
}
++it;
}
@ -5514,7 +5514,7 @@ void EntityList::ExpeditionWarning(uint32 minutes_left)
auto it = client_list.begin();
while (it != client_list.end()) {
it->second->MessageString(Chat::Yellow, DZ_MINUTES_REMAIN, itoa((int)minutes_left));
it->second->MessageString(Chat::Yellow, ClientString::DZ_MINUTES_REMAIN, itoa((int)minutes_left));
it->second->QueuePacket(outapp);
++it;
}

View File

@ -342,18 +342,18 @@ void Client::CalculateLeadershipExp(uint64 &add_exp, uint8 conlevel)
uint64 mentor_exp = exp * (GetGroup()->GetMentorPercent() / 100.0f);
exp -= mentor_exp;
mentoree->AddLeadershipEXP(mentor_exp, 0); // ends up rounded down
mentoree->MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
mentoree->MessageString(Chat::LeaderShip, ClientString::GAIN_GROUP_LEADERSHIP_EXP);
}
if (exp > 0)
{
// possible if you mentor 100% to the other client
AddLeadershipEXP(exp, 0); // ends up rounded up if mentored, no idea how live actually does it
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
MessageString(Chat::LeaderShip, ClientString::GAIN_GROUP_LEADERSHIP_EXP);
}
}
else
{
MessageString(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
MessageString(Chat::LeaderShip, ClientString::MAX_GROUP_LEADERSHIP_POINTS);
}
}
else
@ -366,11 +366,11 @@ void Client::CalculateLeadershipExp(uint64 &add_exp, uint8 conlevel)
&& RuleI(Character, KillsPerRaidLeadershipAA) > 0)
{
AddLeadershipEXP(0, RAID_EXP_PER_POINT / RuleI(Character, KillsPerRaidLeadershipAA));
MessageString(Chat::LeaderShip, GAIN_RAID_LEADERSHIP_EXP);
MessageString(Chat::LeaderShip, ClientString::GAIN_RAID_LEADERSHIP_EXP);
}
else
{
MessageString(Chat::LeaderShip, MAX_RAID_LEADERSHIP_POINTS);
MessageString(Chat::LeaderShip, ClientString::MAX_RAID_LEADERSHIP_POINTS);
}
}
else
@ -387,17 +387,17 @@ void Client::CalculateLeadershipExp(uint64 &add_exp, uint8 conlevel)
uint64 mentor_exp = exp * (raid->GetMentorPercent(group_id) / 100.0f);
exp -= mentor_exp;
mentoree->AddLeadershipEXP(mentor_exp, 0);
mentoree->MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
mentoree->MessageString(Chat::LeaderShip, ClientString::GAIN_GROUP_LEADERSHIP_EXP);
}
if (exp > 0)
{
AddLeadershipEXP(exp, 0);
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
MessageString(Chat::LeaderShip, ClientString::GAIN_GROUP_LEADERSHIP_EXP);
}
}
else
{
MessageString(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
MessageString(Chat::LeaderShip, ClientString::MAX_GROUP_LEADERSHIP_POINTS);
}
}
}
@ -552,11 +552,11 @@ void Client::AddEXP(ExpSource exp_source, uint64 in_add_exp, uint8 conlevel, boo
if (aa_cap >= 0 && aaexp > 0) {
if (m_pp.aapoints == aa_cap) {
MessageString(Chat::Red, AA_CAP);
MessageString(Chat::Red, ClientString::AA_CAP);
aaexp = 0;
m_epp.perAA = 0;
} else if (m_pp.aapoints > aa_cap) {
MessageString(Chat::Red, OVER_AA_CAP, fmt::format_int(aa_cap).c_str(), fmt::format_int(aa_cap).c_str());
MessageString(Chat::Red, ClientString::OVER_AA_CAP, fmt::format_int(aa_cap).c_str(), fmt::format_int(aa_cap).c_str());
m_pp.aapoints = aa_cap;
aaexp = 0;
m_epp.perAA = 0;
@ -645,7 +645,7 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
if (RuleI(Character, ShowExpValues) > 0) {
Message(Chat::Experience, "You regain %s experience from resurrection. %s", exp_amount_message.c_str(), exp_percent_message.c_str());
} else {
MessageString(Chat::Experience, REZ_REGAIN);
MessageString(Chat::Experience, ClientString::REZ_REGAIN);
}
} else {
if (membercount > 1) {
@ -654,7 +654,7 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
} else if (zone->IsHotzone()) {
Message(Chat::Experience, "You gain party experience (with a bonus)!");
} else {
MessageString(Chat::Experience, GAIN_GROUPXP);
MessageString(Chat::Experience, ClientString::GAIN_GROUPXP);
}
} else if (IsRaidGrouped()) {
if (RuleI(Character, ShowExpValues) > 0) {
@ -662,7 +662,7 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
} else if (zone->IsHotzone()) {
Message(Chat::Experience, "You gained raid experience (with a bonus)!");
} else {
MessageString(Chat::Experience, GAIN_RAIDEXP);
MessageString(Chat::Experience, ClientString::GAIN_RAIDEXP);
}
} else {
if (RuleI(Character, ShowExpValues) > 0) {
@ -670,7 +670,7 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
} else if (zone->IsHotzone()) {
Message(Chat::Experience, "You gain experience (with a bonus)!");
} else {
MessageString(Chat::Experience, GAIN_XP);
MessageString(Chat::Experience, ClientString::GAIN_XP);
}
}
}
@ -756,11 +756,11 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
char val2[20] = { 0 };
if (gained == 1 && m_pp.aapoints == 1) {
MessageString(Chat::Experience, GAIN_SINGLE_AA_SINGLE_AA, ConvertArray(m_pp.aapoints, val1)); //You have gained an ability point! You now have %1 ability point.
MessageString(Chat::Experience, ClientString::GAIN_SINGLE_AA_SINGLE_AA, ConvertArray(m_pp.aapoints, val1)); //You have gained an ability point! You now have %1 ability point.
} else if (gained == 1 && m_pp.aapoints > 1) {
MessageString(Chat::Experience, GAIN_SINGLE_AA_MULTI_AA, ConvertArray(m_pp.aapoints, val1)); //You have gained an ability point! You now have %1 ability points.
MessageString(Chat::Experience, ClientString::GAIN_SINGLE_AA_MULTI_AA, ConvertArray(m_pp.aapoints, val1)); //You have gained an ability point! You now have %1 ability points.
} else {
MessageString(Chat::Experience, GAIN_MULTI_AA_MULTI_AA, ConvertArray(gained, val1), ConvertArray(m_pp.aapoints, val2)); //You have gained %1 ability point(s)! You now have %2 ability point(s).
MessageString(Chat::Experience, ClientString::GAIN_MULTI_AA_MULTI_AA, ConvertArray(gained, val1), ConvertArray(m_pp.aapoints, val2)); //You have gained %1 ability point(s)! You now have %2 ability point(s).
}
if (RuleB(AA, SoundForAAEarned)) {
@ -808,18 +808,18 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
char val1[20]={0};
if (level_increase) {
if (level_count == 1) {
MessageString(Chat::Experience, GAIN_LEVEL, ConvertArray(check_level, val1));
MessageString(Chat::Experience, ClientString::GAIN_LEVEL, ConvertArray(check_level, val1));
} else {
Message(Chat::Yellow, "Welcome to level %i!", check_level);
}
if (check_level == RuleI(Character, DeathItemLossLevel) &&
m_ClientVersionBit & EQ::versions::maskUFAndEarlier) {
MessageString(Chat::Yellow, CORPSE_ITEM_LOST);
MessageString(Chat::Yellow, ClientString::CORPSE_ITEM_LOST);
}
if (check_level == RuleI(Character, DeathExpLossLevel)) {
MessageString(Chat::Yellow, CORPSE_EXP_LOST);
MessageString(Chat::Yellow, ClientString::CORPSE_EXP_LOST);
}
}
@ -875,7 +875,7 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
char val1[20]={0};
char val2[20]={0};
char val3[20]={0};
MessageString(Chat::Experience, GM_GAINXP, ConvertArray(set_aaxp,val1),ConvertArray(set_exp,val2),ConvertArray(GetEXPForLevel(GetLevel()+1),val3)); //[GM] You have gained %1 AXP and %2 EXP (%3).
MessageString(Chat::Experience, ClientString::GM_GAINXP, ConvertArray(set_aaxp,val1),ConvertArray(set_exp,val2),ConvertArray(GetEXPForLevel(GetLevel()+1),val3)); //[GM] You have gained %1 AXP and %2 EXP (%3).
}
}
@ -1242,12 +1242,12 @@ void Client::SetLeadershipEXP(uint64 group_exp, uint64 raid_exp) {
while(group_exp >= GROUP_EXP_PER_POINT) {
group_exp -= GROUP_EXP_PER_POINT;
m_pp.group_leadership_points++;
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_POINT);
MessageString(Chat::LeaderShip, ClientString::GAIN_GROUP_LEADERSHIP_POINT);
}
while(raid_exp >= RAID_EXP_PER_POINT) {
raid_exp -= RAID_EXP_PER_POINT;
m_pp.raid_leadership_points++;
MessageString(Chat::LeaderShip, GAIN_RAID_LEADERSHIP_POINT);
MessageString(Chat::LeaderShip, ClientString::GAIN_RAID_LEADERSHIP_POINT);
}
m_pp.group_leadership_exp = group_exp;

View File

@ -254,7 +254,7 @@ void ExpeditionRequest::SendLeaderMemberInExpedition(const std::string& name, bo
if (is_solo)
{
SendLeaderMessage(Chat::Red, DZ_YOU_BELONG);
SendLeaderMessage(Chat::Red, ClientString::DZ_YOU_BELONG);
}
else if (m_requester)
{
@ -274,11 +274,11 @@ void ExpeditionRequest::SendLeaderMemberReplayLockout(const std::string& name, c
auto time = lockout.GetTimeRemainingStrs();
if (is_solo)
{
SendLeaderMessage(Chat::Red, DZ_REPLAY_YOU, { time.days, time.hours, time.mins });
SendLeaderMessage(Chat::Red, ClientString::DZ_REPLAY_YOU, { time.days, time.hours, time.mins });
}
else
{
SendLeaderMessage(Chat::Red, DZ_REPLAY_OTHER, { name, time.days, time.hours, time.mins });
SendLeaderMessage(Chat::Red, ClientString::DZ_REPLAY_OTHER, { name, time.days, time.hours, time.mins });
}
}
@ -290,7 +290,7 @@ void ExpeditionRequest::SendLeaderMemberEventLockout(const std::string& name, co
}
auto time = lockout.GetTimeRemainingStrs();
SendLeaderMessage(Chat::Red, DZ_EVENT_TIMER, { name, lockout.Event(), time.days, time.hours, time.mins });
SendLeaderMessage(Chat::Red, ClientString::DZ_EVENT_TIMER, { name, lockout.Event(), time.days, time.hours, time.mins });
}
bool ExpeditionRequest::IsPlayerCountValidated()
@ -305,7 +305,7 @@ bool ExpeditionRequest::IsPlayerCountValidated()
{
requirements_met = false;
SendLeaderMessage(Chat::System, DZ_PLAYER_COUNT, {
SendLeaderMessage(Chat::System, ClientString::DZ_PLAYER_COUNT, {
fmt::format_int(m_members.size()).str(),
fmt::format_int(m_dz->GetMinPlayers()).str(),
fmt::format_int(m_dz->GetMaxPlayers()).str()

View File

@ -196,14 +196,14 @@ bool Client::CanFish() {
if (!Pole || !Pole->IsClassCommon() || Pole->GetItem()->ItemType != EQ::item::ItemTypeFishingPole) {
if (m_inv.HasItemByUse(EQ::item::ItemTypeFishingPole, 1, invWhereWorn | invWherePersonal | invWhereBank | invWhereSharedBank | invWhereTrading | invWhereCursor)) //We have a fishing pole somewhere, just not equipped
MessageString(Chat::Skills, FISHING_EQUIP_POLE); //You need to put your fishing pole in your primary hand.
MessageString(Chat::Skills, ClientString::FISHING_EQUIP_POLE); //You need to put your fishing pole in your primary hand.
else //We don't have a fishing pole anywhere
MessageString(Chat::Skills, FISHING_NO_POLE); //You can't fish without a fishing pole, go buy one.
MessageString(Chat::Skills, ClientString::FISHING_NO_POLE); //You can't fish without a fishing pole, go buy one.
return false;
}
if (!Bait || !Bait->IsClassCommon() || Bait->GetItem()->ItemType != EQ::item::ItemTypeFishingBait) {
MessageString(Chat::Skills, FISHING_NO_BAIT); //You can't fish without fishing bait, go buy some.
MessageString(Chat::Skills, ClientString::FISHING_NO_BAIT); //You can't fish without fishing bait, go buy some.
return false;
}
@ -225,7 +225,7 @@ bool Client::CanFish() {
float bestz = zone->zonemap->FindBestZ(rodPosition, nullptr);
float len = m_Position.z - bestz;
if(len > LineLength || len < 0.0f) {
MessageString(Chat::Skills, FISHING_LAND);
MessageString(Chat::Skills, ClientString::FISHING_LAND);
return false;
}
@ -238,7 +238,7 @@ bool Client::CanFish() {
bool in_water = zone->watermap->InWater(dest) || zone->watermap->InVWater(dest);
if (in_lava) {
MessageString(Chat::Skills, FISHING_LAVA); //Trying to catch a fire elemental or something?
MessageString(Chat::Skills, ClientString::FISHING_LAVA); //Trying to catch a fire elemental or something?
return false;
}
@ -247,7 +247,7 @@ bool Client::CanFish() {
}
}
MessageString(Chat::Skills, FISHING_LAND);
MessageString(Chat::Skills, ClientString::FISHING_LAND);
return false;
}
return true;
@ -354,17 +354,17 @@ void Client::GoFish(bool guarantee, bool use_bait)
if (food_item) {
if (food_item->ItemType != EQ::item::ItemTypeFood) {
MessageString(Chat::Skills, FISHING_SUCCESS);
MessageString(Chat::Skills, ClientString::FISHING_SUCCESS);
}
else {
MessageString(Chat::Skills, FISHING_SUCCESS_FISH_NAME, food_item->Name);
MessageString(Chat::Skills, ClientString::FISHING_SUCCESS_FISH_NAME, food_item->Name);
}
EQ::ItemInstance* inst = database.CreateItem(food_item, 1);
if (inst != nullptr) {
if (CheckLoreConflict(inst->GetItem()))
{
MessageString(Chat::White, DUP_LORE);
MessageString(Chat::White, ClientString::DUP_LORE);
safe_delete(inst);
}
else
@ -408,13 +408,13 @@ void Client::GoFish(bool guarantee, bool use_bait)
//chance to use bait when you dont catch anything...
if (zone->random.Int(0, 4) == 1) {
DeleteItemInInventory(bslot, 1, true); //do we need client update?
MessageString(Chat::Skills, FISHING_LOST_BAIT); //You lost your bait!
MessageString(Chat::Skills, ClientString::FISHING_LOST_BAIT); //You lost your bait!
} else {
if (zone->random.Int(0, 15) == 1) //give about a 1 in 15 chance to spill your beer. we could make this a rule, but it doesn't really seem worth it
//TODO: check for & consume an alcoholic beverage from inventory when this triggers, and set it as a rule that's disabled by default
MessageString(Chat::Skills, FISHING_SPILL_BEER); //You spill your beer while bringing in your line.
MessageString(Chat::Skills, ClientString::FISHING_SPILL_BEER); //You spill your beer while bringing in your line.
else
MessageString(Chat::Skills, FISHING_FAILED); //You didn't catch anything.
MessageString(Chat::Skills, ClientString::FISHING_FAILED); //You didn't catch anything.
}
RecordPlayerEventLog(PlayerEvent::FISH_FAILURE, PlayerEvent::EmptyEvent{});
@ -431,7 +431,7 @@ void Client::GoFish(bool guarantee, bool use_bait)
if (Pole) {
const EQ::ItemData* fishing_item = Pole->GetItem();
if (fishing_item && fishing_item->SubType == 0 && zone->random.Int(0, 49) == 1) {
MessageString(Chat::Skills, FISHING_POLE_BROKE); //Your fishing pole broke!
MessageString(Chat::Skills, ClientString::FISHING_POLE_BROKE); //Your fishing pole broke!
DeleteItemInInventory(EQ::invslot::slotPrimary, 0, true);
}
}
@ -461,7 +461,7 @@ void Client::ForageItem(bool guarantee) {
// these may need to be fine tuned, I am just guessing here
if (guarantee || zone->random.Int(0,199) < skill_level) {
uint32 foragedfood = 0;
uint32 stringid = FORAGE_NOEAT;
uint32 stringid = ClientString::FORAGE_NOEAT;
if (zone->random.Roll(RuleI(Zone, ForageChance))) {
foragedfood = content_db.LoadForage(m_pp.zone_id, skill_level);
@ -482,17 +482,17 @@ void Client::ForageItem(bool guarantee) {
}
if (foragedfood == 13106) {
stringid = FORAGE_GRUBS;
stringid = ClientString::FORAGE_GRUBS;
} else {
switch(food_item->ItemType) {
case EQ::item::ItemTypeFood:
stringid = FORAGE_FOOD;
stringid = ClientString::FORAGE_FOOD;
break;
case EQ::item::ItemTypeDrink:
if (strstr(food_item->Name, "ater")) {
stringid = FORAGE_WATER;
stringid = ClientString::FORAGE_WATER;
} else {
stringid = FORAGE_DRINK;
stringid = ClientString::FORAGE_DRINK;
}
break;
default:
@ -505,7 +505,7 @@ void Client::ForageItem(bool guarantee) {
if (inst != nullptr) {
// check to make sure it isn't a foraged lore item
if (CheckLoreConflict(inst->GetItem())) {
MessageString(Chat::White, DUP_LORE);
MessageString(Chat::White, ClientString::DUP_LORE);
safe_delete(inst);
} else {
PushItemOnCursor(*inst);
@ -544,11 +544,11 @@ void Client::ForageItem(bool guarantee) {
int ChanceSecondForage = aabonuses.ForageAdditionalItems + itembonuses.ForageAdditionalItems + spellbonuses.ForageAdditionalItems;
if (!guarantee && zone->random.Roll(ChanceSecondForage)) {
MessageString(Chat::Skills, FORAGE_MASTERY);
MessageString(Chat::Skills, ClientString::FORAGE_MASTERY);
ForageItem(true);
}
} else {
MessageString(Chat::Skills, FORAGE_FAILED);
MessageString(Chat::Skills, ClientString::FORAGE_FAILED);
RecordPlayerEventLog(PlayerEvent::FORAGE_FAILURE, PlayerEvent::EmptyEvent{});
if (parse->PlayerHasQuestSub(EVENT_FORAGE_FAILURE)) {

View File

@ -51,7 +51,7 @@ void command_parcels(Client *c, const Seperator *sep)
auto player_id = CharacterParcelsRepository::GetParcelCountAndCharacterName(database, player_name);
if (!player_id.at(0).char_id) {
c->MessageString(Chat::Yellow, CANT_FIND_PLAYER, player_name.c_str());
c->MessageString(Chat::Yellow, ClientString::CANT_FIND_PLAYER, player_name.c_str());
return;
}
@ -138,7 +138,7 @@ void command_parcels(Client *c, const Seperator *sep)
to_name
);
if (send_to_client.at(0).character_name.empty()) {
c->MessageString(Chat::Yellow, CANT_FIND_PLAYER, to_name.c_str());
c->MessageString(Chat::Yellow, ClientString::CANT_FIND_PLAYER, to_name.c_str());
return;
}
@ -205,7 +205,7 @@ void command_parcels(Client *c, const Seperator *sep)
c->MessageString(
Chat::Yellow,
PARCEL_DELIVERY,
ClientString::PARCEL_DELIVERY,
c->GetCleanName(),
"Money",
send_to_client.at(0).character_name.c_str()
@ -289,7 +289,7 @@ void command_parcels(Client *c, const Seperator *sep)
c->MessageString(
Chat::Yellow,
PARCEL_DELIVERY,
ClientString::PARCEL_DELIVERY,
c->GetCleanName(),
inst->GetItem()->Name,
send_to_client.at(0).character_name.c_str()
@ -319,4 +319,4 @@ void command_parcels(Client *c, const Seperator *sep)
c->SendParcelDeliveryToWorld(ps);
}
}
}
}

View File

@ -189,8 +189,8 @@ void Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinu
// the group member other than the character doing the /split only gets this message "(splitter) shares the money with the group"
if (share && member_client != splitter) {
member_client->MessageString(
YOU_RECEIVE_AS_SPLIT,
SHARE_MONEY,
ClientString::YOU_RECEIVE_AS_SPLIT,
ClientString::SHARE_MONEY,
splitter->GetCleanName()
);
}
@ -200,7 +200,7 @@ void Group::SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinu
member_client->AddMoneyToPP(receive_copper, receive_silver, receive_gold, receive_platinum, true);
member_client->MessageString(
Chat::MoneySplit,
YOU_RECEIVE_AS_SPLIT,
ClientString::YOU_RECEIVE_AS_SPLIT,
Strings::Money(receive_platinum, receive_gold, receive_silver, receive_copper).c_str()
);
}

View File

@ -405,7 +405,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack)
c.second->SendGuildActiveTributes(c.second->GuildID());
c.second->SendGuildDeletePacket(s->guild_id);
c.second->RefreshGuildInfo();
c.second->MessageString(Chat::Guild, GUILD_DISBANDED);
c.second->MessageString(Chat::Guild, ClientString::GUILD_DISBANDED);
c.second->SendGuildList();
}
}

View File

@ -125,7 +125,7 @@ const NPCType *Horse::BuildHorseType(uint16 spell_id)
void Client::SummonHorse(uint16 spell_id)
{
if (GetHorseId()) {
MessageString(Chat::Red, ALREADY_ON_A_MOUNT);
MessageString(Chat::Red, ClientString::ALREADY_ON_A_MOUNT);
return;
}

View File

@ -1210,7 +1210,7 @@ void Merc::AI_Process() {
{
if(zone->random.Roll(flurrychance))
{
MessageString(Chat::NPCFlurry, YOU_FLURRY);
MessageString(Chat::NPCFlurry, ClientString::YOU_FLURRY);
Attack(GetTarget(), EQ::invslot::slotPrimary, false);
Attack(GetTarget(), EQ::invslot::slotPrimary, false);
}
@ -2208,7 +2208,7 @@ int64 Merc::GetFocusEffect(focusType type, uint16 spell_id, bool from_buff_tic)
realTotal = CalcFocusEffect(type, UsedFocusID, spell_id);
if (realTotal != 0 && UsedItem)
MessageString(Chat::FocusEffect, BEGINS_TO_GLOW, UsedItem->Name);
MessageString(Chat::FocusEffect, ClientString::BEGINS_TO_GLOW, UsedItem->Name);
}
//Check if spell focus effect exists for the client.

View File

@ -5050,13 +5050,13 @@ void Mob::Say(const char *format, ...)
std::string new_message = EQ::SayLinkEngine::InjectSaylinksIfNotExist(buf);
entity_list.MessageCloseString(
talker, false, distance, Chat::NPCQuestSay,
GENERIC_SAY, GetCleanName(), new_message.c_str()
ClientString::GENERIC_SAY, GetCleanName(), new_message.c_str()
);
}
else {
entity_list.MessageCloseString(
talker, false, distance, Chat::NPCQuestSay,
GENERIC_SAY, GetCleanName(), buf
ClientString::GENERIC_SAY, GetCleanName(), buf
);
}
}
@ -5072,7 +5072,7 @@ void Mob::SayString(uint32 string_id, const char *message3, const char *message4
entity_list.MessageCloseString(
this, false, 200, 10,
GENERIC_STRINGID_SAY, GetCleanName(), string_id_str, message3, message4, message5,
ClientString::GENERIC_STRINGID_SAY, GetCleanName(), string_id_str, message3, message4, message5,
message6, message7, message8, message9
);
}
@ -5085,7 +5085,7 @@ void Mob::SayString(uint32 type, uint32 string_id, const char *message3, const c
entity_list.MessageCloseString(
this, false, 200, type,
GENERIC_STRINGID_SAY, GetCleanName(), string_id_str, message3, message4, message5,
ClientString::GENERIC_STRINGID_SAY, GetCleanName(), string_id_str, message3, message4, message5,
message6, message7, message8, message9
);
}
@ -5097,7 +5097,7 @@ void Mob::SayString(Client *to, uint32 string_id, const char *message3, const ch
auto string_id_str = std::to_string(string_id);
to->MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
to->MessageString(Chat::NPCQuestSay, ClientString::GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
}
void Mob::SayString(Client *to, uint32 type, uint32 string_id, const char *message3, const char *message4, const char *message5, const char *message6, const char *message7, const char *message8, const char *message9)
@ -5107,7 +5107,7 @@ void Mob::SayString(Client *to, uint32 type, uint32 string_id, const char *messa
auto string_id_str = std::to_string(string_id);
to->MessageString(type, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
to->MessageString(type, ClientString::GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
}
void Mob::Shout(const char *format, ...)
@ -5120,7 +5120,7 @@ void Mob::Shout(const char *format, ...)
va_end(ap);
entity_list.MessageString(this, false, Chat::Shout,
GENERIC_SHOUT, GetCleanName(), buf);
ClientString::GENERIC_SHOUT, GetCleanName(), buf);
}
void Mob::Emote(const char *format, ...)
@ -5134,7 +5134,7 @@ void Mob::Emote(const char *format, ...)
entity_list.MessageCloseString(
this, false, 200, 10,
GENERIC_EMOTE, GetCleanName(), buf
ClientString::GENERIC_EMOTE, GetCleanName(), buf
);
}
@ -5322,12 +5322,12 @@ void Mob::ExecWeaponProc(const EQ::ItemInstance* inst, uint16 spell_id, Mob* on,
}
if (IsSilenced() && !IsDiscipline(spell_id)) {
MessageString(Chat::Red, SILENCED_STRING);
MessageString(Chat::Red, ClientString::SILENCED_STRING);
return;
}
if (IsAmnesiad() && IsDiscipline(spell_id)) {
MessageString(Chat::Red, MELEE_SILENCE);
MessageString(Chat::Red, ClientString::MELEE_SILENCE);
return;
}
@ -7154,16 +7154,16 @@ void Mob::SlowMitigation(Mob* caster)
if (GetSlowMitigation() && caster && caster->IsClient())
{
if ((GetSlowMitigation() > 0) && (GetSlowMitigation() < 26))
caster->MessageString(Chat::SpellFailure, SLOW_MOSTLY_SUCCESSFUL);
caster->MessageString(Chat::SpellFailure, ClientString::SLOW_MOSTLY_SUCCESSFUL);
else if ((GetSlowMitigation() >= 26) && (GetSlowMitigation() < 74))
caster->MessageString(Chat::SpellFailure, SLOW_PARTIALLY_SUCCESSFUL);
caster->MessageString(Chat::SpellFailure, ClientString::SLOW_PARTIALLY_SUCCESSFUL);
else if ((GetSlowMitigation() >= 74) && (GetSlowMitigation() < 101))
caster->MessageString(Chat::SpellFailure, SLOW_SLIGHTLY_SUCCESSFUL);
caster->MessageString(Chat::SpellFailure, ClientString::SLOW_SLIGHTLY_SUCCESSFUL);
else if (GetSlowMitigation() > 100)
caster->MessageString(Chat::SpellFailure, SPELL_OPPOSITE_EFFECT);
caster->MessageString(Chat::SpellFailure, ClientString::SPELL_OPPOSITE_EFFECT);
}
}
@ -7956,7 +7956,7 @@ bool Mob::ShieldAbility(uint32 target_id, int shielder_max_distance, int shield_
if (!can_shield_npc && shield_target->IsNPC()) {
if (IsClient()) {
MessageString(Chat::White, SHIELD_TARGET_NPC);
MessageString(Chat::White, ClientString::SHIELD_TARGET_NPC);
}
return false;
}
@ -7977,7 +7977,7 @@ bool Mob::ShieldAbility(uint32 target_id, int shielder_max_distance, int shield_
//You have a shielder, or your 'Shield Target' already has a 'Shielder'
if (GetShielderID() || shield_target->GetShielderID()) {
if (IsClient()) {
MessageString(Chat::White, ALREADY_SHIELDED);
MessageString(Chat::White, ClientString::ALREADY_SHIELDED);
}
return false;
}
@ -7985,7 +7985,7 @@ bool Mob::ShieldAbility(uint32 target_id, int shielder_max_distance, int shield_
//You are being shielded or already have a 'Shield Target'
if (GetShieldTargetID() || shield_target->GetShieldTargetID()) {
if (IsClient()) {
MessageString(Chat::White, ALREADY_SHIELDING);
MessageString(Chat::White, ClientString::ALREADY_SHIELDING);
}
return false;
}
@ -7997,11 +7997,11 @@ bool Mob::ShieldAbility(uint32 target_id, int shielder_max_distance, int shield_
}
if (shield_target->CalculateDistance(GetX(), GetY(), GetZ()) > static_cast<float>(shielder_max_distance)) {
MessageString(Chat::Blue, TARGET_TOO_FAR);
MessageString(Chat::Blue, ClientString::TARGET_TOO_FAR);
return false;
}
entity_list.MessageCloseString(this, false, 100, 0, START_SHIELDING, GetCleanName(), shield_target->GetCleanName());
entity_list.MessageCloseString(this, false, 100, 0, ClientString::START_SHIELDING, GetCleanName(), shield_target->GetCleanName());
SetShieldTargetID(shield_target->GetID());
SetShielderMitigation(shielder_mitigation);
@ -8025,7 +8025,7 @@ void Mob::ShieldAbilityFinish()
Mob* shield_target = entity_list.GetMob(GetShieldTargetID());
if (shield_target) {
entity_list.MessageCloseString(this, false, 100, 0, END_SHIELDING, GetCleanName(), shield_target->GetCleanName());
entity_list.MessageCloseString(this, false, 100, 0, ClientString::END_SHIELDING, GetCleanName(), shield_target->GetCleanName());
shield_target->SetShielderID(0);
shield_target->SetShieldTargetMitigation(0);
}

View File

@ -529,7 +529,7 @@ void NPC::AI_Stop() {
void Client::AI_Stop() {
Mob::AI_Stop();
MessageString(Chat::Red,PLAYER_REGAIN);
MessageString(Chat::Red, ClientString::PLAYER_REGAIN);
auto app = new EQApplicationPacket(OP_Charm, sizeof(Charm_Struct));
Charm_Struct *ps = (Charm_Struct*)app->pBuffer;
@ -1101,7 +1101,7 @@ void Mob::AI_Process() {
auto pet_owner = GetOwner();
if (pet_owner && pet_owner->IsClient()) {
pet_owner->MessageString(Chat::NPCQuestSay, CANNOT_WAKE, GetCleanName(), target->GetCleanName());
pet_owner->MessageString(Chat::NPCQuestSay, ClientString::CANNOT_WAKE, GetCleanName(), target->GetCleanName());
}
RemoveFromHateList(target);
@ -1960,14 +1960,14 @@ void Mob::StartEnrage()
// start the timer. need to call IsEnraged frequently since we dont have callback timers :-/
bEnraged = true;
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_START, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, ClientString::NPC_ENRAGE_START, GetCleanName());
}
void Mob::ProcessEnrage(){
if(IsEnraged()){
Timer *timer = GetSpecialAbilityTimer(SpecialAbility::Enrage);
if(timer && timer->Check()){
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_END, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, ClientString::NPC_ENRAGE_END, GetCleanName());
int enraged_cooldown = GetSpecialAbilityParam(SpecialAbility::Enrage, 2);
enraged_cooldown = enraged_cooldown > 0 ? enraged_cooldown : EnragedTimer;
@ -1993,7 +1993,7 @@ bool Mob::Flurry(ExtraAttackOptions *opts)
true,
200,
Chat::PetFlurry,
NPC_FLURRY,
ClientString::NPC_FLURRY,
GetCleanName(),
target->GetCleanName());
} else {
@ -2002,7 +2002,7 @@ bool Mob::Flurry(ExtraAttackOptions *opts)
true,
200,
Chat::NPCFlurry,
NPC_FLURRY,
ClientString::NPC_FLURRY,
GetCleanName(),
target->GetCleanName());
}
@ -2070,9 +2070,9 @@ bool Mob::Rampage(ExtraAttackOptions *opts)
{
int index_hit = 0;
if (IsPet() || IsTempPet() || IsCharmed() || IsAnimation()){
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, NPC_RAMPAGE, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, ClientString::NPC_RAMPAGE, GetCleanName());
} else {
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, NPC_RAMPAGE, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, ClientString::NPC_RAMPAGE, GetCleanName());
}
int rampage_targets = GetSpecialAbilityParam(SpecialAbility::Rampage, 1);
@ -2143,9 +2143,9 @@ void Mob::AreaRampage(ExtraAttackOptions *opts)
{
int index_hit = 0;
if (IsPet() || IsTempPet() || IsCharmed() || IsAnimation()) { // do not know every pet AA so thought it safer to add this
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, AE_RAMPAGE, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, ClientString::AE_RAMPAGE, GetCleanName());
} else {
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, AE_RAMPAGE, GetCleanName());
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, ClientString::AE_RAMPAGE, GetCleanName());
}
int rampage_targets = GetSpecialAbilityParam(SpecialAbility::AreaRampage, 1);

View File

@ -1852,17 +1852,17 @@ void NPC::Disarm(Client* client, int chance) {
SendWearChange(matslot);
if ((CastToMob()->GetBodyType() == BodyType::Humanoid || CastToMob()->GetBodyType() == BodyType::Summoned) && eslot == EQ::invslot::slotPrimary)
Say("Ahh! My weapon!");
client->MessageString(Chat::Skills, DISARM_SUCCESS, GetCleanName());
client->MessageString(Chat::Skills, ClientString::DISARM_SUCCESS, GetCleanName());
if (chance != 1000)
client->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 4);
return;
}
client->MessageString(Chat::Skills, DISARM_FAILED);
client->MessageString(Chat::Skills, ClientString::DISARM_FAILED);
if (chance != 1000)
client->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 2);
return;
}
client->MessageString(Chat::Skills, DISARM_FAILED);
client->MessageString(Chat::Skills, ClientString::DISARM_FAILED);
}
void Mob::NPCSpecialAttacks(const char* parse, int permtag, bool reset, bool remove) {
@ -2929,7 +2929,7 @@ void NPC::DoNPCEmote(uint8 event_, uint32 emote_id, Mob* t)
true,
200,
Chat::NPCQuestSay,
GENERIC_STRING,
ClientString::GENERIC_STRING,
processed.c_str()
);
}

View File

@ -242,7 +242,7 @@ void Client::SendParcelStatus()
else if (num_over_limit == 1) {
MessageString(
Chat::Red,
PARCEL_STATUS_1,
ClientString::PARCEL_STATUS_1,
std::to_string(num_of_parcels).c_str(),
std::to_string(RuleI(Parcel, ParcelMaxItems)).c_str()
);
@ -250,7 +250,7 @@ void Client::SendParcelStatus()
else if (num_over_limit > 1) {
MessageString(
Chat::Red,
PARCEL_STATUS_2,
ClientString::PARCEL_STATUS_2,
std::to_string(num_of_parcels).c_str(),
std::to_string(num_over_limit).c_str(),
std::to_string(RuleI(Parcel, ParcelMaxItems)).c_str()
@ -331,7 +331,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
}
if (!GetParcelEnabled()) {
MessageString(Chat::Yellow, PARCEL_DELAY, merchant->GetCleanName());
MessageString(Chat::Yellow, ClientString::PARCEL_DELAY, merchant->GetCleanName());
DoParcelCancel();
SendParcelAck();
return;
@ -371,7 +371,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
if (send_to_client.at(0).character_name.empty()) {
MessageString(
Chat::Yellow,
PARCEL_UNKNOWN_NAME,
ClientString::PARCEL_UNKNOWN_NAME,
merchant->GetCleanName(),
parcel_in->send_to,
inst->GetItem()->Name
@ -462,7 +462,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
MessageString(
Chat::Yellow,
PARCEL_DELIVERY,
ClientString::PARCEL_DELIVERY,
merchant->GetCleanName(),
inst->GetItem()->Name,
send_to_client.at(0).character_name.c_str()
@ -528,7 +528,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
if (send_to_client.at(0).character_name.empty()) {
MessageString(
Chat::Yellow,
PARCEL_UNKNOWN_NAME,
ClientString::PARCEL_UNKNOWN_NAME,
merchant->GetCleanName(),
parcel_in->send_to,
"Money"
@ -566,7 +566,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
MessageString(
Chat::Yellow,
PARCEL_DELIVERY,
ClientString::PARCEL_DELIVERY,
merchant->GetCleanName(),
"Money",
send_to_client.at(0).character_name.c_str()
@ -687,7 +687,7 @@ void Client::DoParcelRetrieve(const ParcelRetrieve_Struct &parcel_in)
case PARCEL_MONEY_ITEM_ID: {
AddMoneyToPP(p->second.quantity, true);
MessageString(
Chat::Yellow, PARCEL_DELIVERED, merchant->GetCleanName(), "Money", p->second.from_name.c_str()
Chat::Yellow, ClientString::PARCEL_DELIVERED, merchant->GetCleanName(), "Money", p->second.from_name.c_str()
);
break;
}
@ -717,11 +717,11 @@ void Client::DoParcelRetrieve(const ParcelRetrieve_Struct &parcel_in)
if (CheckLoreConflict(item->GetItem())) {
if (RuleB(Parcel, DeleteOnDuplicate)) {
MessageString(Chat::Yellow, PARCEL_DUPLICATE_DELETE, inst->GetItem()->Name);
MessageString(Chat::Yellow, ClientString::PARCEL_DUPLICATE_DELETE, inst->GetItem()->Name);
continue;
}
MessageString(Chat::Yellow, DUP_LORE);
MessageString(Chat::Yellow, ClientString::DUP_LORE);
SendParcelRetrieveAck();
return;
}
@ -733,16 +733,16 @@ void Client::DoParcelRetrieve(const ParcelRetrieve_Struct &parcel_in)
auto const free_id = GetInv().FindFirstFreeSlotThatFitsItemWithStacking(inst.get());
if (free_id == INVALID_INDEX) {
SendParcelRetrieveAck();
MessageString(Chat::White, PARCEL_INV_FULL, merchant->GetCleanName());
MessageString(Chat::White, ClientString::PARCEL_INV_FULL, merchant->GetCleanName());
return;
}
if (CheckLoreConflict(inst->GetItem())) {
if (RuleB(Parcel, DeleteOnDuplicate)) {
MessageString(Chat::Yellow, PARCEL_DUPLICATE_DELETE, inst->GetItem()->Name);
MessageString(Chat::Yellow, ClientString::PARCEL_DUPLICATE_DELETE, inst->GetItem()->Name);
}
else {
MessageString(Chat::Yellow, DUP_LORE);
MessageString(Chat::Yellow, ClientString::DUP_LORE);
SendParcelRetrieveAck();
return;
}
@ -751,7 +751,7 @@ void Client::DoParcelRetrieve(const ParcelRetrieve_Struct &parcel_in)
if (AutoPutLootInInventory(*inst.get(), false, true)) {
MessageString(
Chat::Yellow,
PARCEL_DELIVERED_2,
ClientString::PARCEL_DELIVERED_2,
merchant->GetCleanName(),
std::to_string(item_quantity).c_str(),
inst->GetItem()->Name,

View File

@ -979,7 +979,7 @@ void Raid::SplitMoney(uint32 gid, uint32 copper, uint32 silver, uint32 gold, uin
m.member->MessageString(
Chat::MoneySplit,
YOU_RECEIVE_AS_SPLIT,
ClientString::YOU_RECEIVE_AS_SPLIT,
Strings::Money(
platinum_split,
gold_split,
@ -2317,13 +2317,13 @@ void Raid::DelegateAbilityAssist(Mob* delegator, const char* delegatee)
{
auto raid_delegatee = entity_list.GetRaidByName(delegatee);
if (!raid_delegatee) {
delegator->CastToClient()->MessageString(Chat::Cyan, NOT_IN_YOUR_RAID, delegatee);
delegator->CastToClient()->MessageString(Chat::Cyan, ClientString::NOT_IN_YOUR_RAID, delegatee);
return;
}
uint32 raid_delegatee_id = raid_delegatee->GetID();
uint32 raid_delegator_id = GetID();
if (raid_delegatee_id != raid_delegator_id) {
delegator->CastToClient()->MessageString(Chat::Cyan, NOT_IN_YOUR_RAID, delegatee);
delegator->CastToClient()->MessageString(Chat::Cyan, ClientString::NOT_IN_YOUR_RAID, delegatee);
return;
}
@ -2339,7 +2339,7 @@ void Raid::DelegateAbilityAssist(Mob* delegator, const char* delegatee)
auto slot = FindNextRaidDelegateSlot(FindNextAssisterSlot);
auto ma = rm->main_assister;
if (slot == -1 && !ma) {
delegator->CastToClient()->MessageString(Chat::Cyan, MAX_MAIN_RAID_ASSISTERS);
delegator->CastToClient()->MessageString(Chat::Cyan, ClientString::MAX_MAIN_RAID_ASSISTERS);
return;
}
@ -2454,13 +2454,13 @@ void Raid::DelegateAbilityMark(Mob* delegator, const char* delegatee)
{
auto raid_delegatee = entity_list.GetRaidByName(delegatee);
if (!raid_delegatee) {
delegator->CastToClient()->MessageString(Chat::Cyan, NOT_IN_YOUR_RAID, delegatee);
delegator->CastToClient()->MessageString(Chat::Cyan, ClientString::NOT_IN_YOUR_RAID, delegatee);
return;
}
uint32 raid_delegatee_id = raid_delegatee->GetID();
uint32 raid_delegator_id = GetID();
if (raid_delegatee_id != raid_delegator_id) {
delegator->CastToClient()->MessageString(Chat::Cyan, NOT_IN_YOUR_RAID, delegatee);
delegator->CastToClient()->MessageString(Chat::Cyan, ClientString::NOT_IN_YOUR_RAID, delegatee);
return;
}
@ -2477,7 +2477,7 @@ void Raid::DelegateAbilityMark(Mob* delegator, const char* delegatee)
auto mm = rm->main_marker;
if (slot == -1 && !mm) {
delegator->CastToClient()->MessageString(Chat::Cyan, MAX_MAIN_RAID_MARKERS);
delegator->CastToClient()->MessageString(Chat::Cyan, ClientString::MAX_MAIN_RAID_MARKERS);
return;
}
@ -2609,7 +2609,7 @@ void Raid::RaidMarkNPC(Mob* mob, uint32 parameter)
}
}
//client is not delegated the mark ability
c->MessageString(Chat::Cyan, NOT_DELEGATED_MARKER);
c->MessageString(Chat::Cyan, ClientString::NOT_DELEGATED_MARKER);
return;
}
@ -2638,7 +2638,7 @@ void Raid::RaidClearNPCMarks(Client* c)
&& marked_npcs[i].instance_id == c->GetInstanceID())
{
auto npc_name = entity_list.GetNPCByID(marked_npcs[i].entity_id)->GetCleanName();
RaidMessageString(nullptr, Chat::Cyan, RAID_NO_LONGER_MARKED, npc_name);
RaidMessageString(nullptr, Chat::Cyan, ClientString::RAID_NO_LONGER_MARKED, npc_name);
marked_npcs[i].entity_id = 0;
marked_npcs[i].zone_id = 0;
marked_npcs[i].instance_id = 0;
@ -2665,7 +2665,7 @@ void Raid::RaidClearNPCMarks(Client* c)
UpdateXtargetMarkedNPC();
}
else {
c->MessageString(Chat::Cyan, NOT_DELEGATED_MARKER);
c->MessageString(Chat::Cyan, ClientString::NOT_DELEGATED_MARKER);
}
}

View File

@ -254,7 +254,7 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQ::skills::SkillType skill, int32 bas
auto fbash = GetSpellFuriousBash(itm->Focus.Effect);
hate = hate * (100 + fbash) / 100;
if (fbash)
MessageString(Chat::FocusEffect, GLOWS_RED, itm->Name);
MessageString(Chat::FocusEffect, ClientString::GLOWS_RED, itm->Name);
}
}
}
@ -722,7 +722,7 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) {
const EQ::ItemInstance *wpn = CastToClient()->GetInv().GetItem(EQ::invslot::slotPrimary);
if (!wpn || (wpn->GetItem()->ItemType != EQ::item::ItemType1HPiercing)){
MessageString(Chat::Red, BACKSTAB_WEAPON);
MessageString(Chat::Red, ClientString::BACKSTAB_WEAPON);
return;
}
}
@ -965,10 +965,10 @@ bool Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
if (float dist = DistanceSquared(m_Position, other->GetPosition()); dist > range) {
LogCombat("Ranged attack out of range client should catch this. ([{}] > [{}]).\n", dist, range);
MessageString(Chat::Red,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
MessageString(Chat::Red, ClientString::TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
return false;
} else if (dist < (RuleI(Combat, MinRangedAttackDist)*RuleI(Combat, MinRangedAttackDist))){
MessageString(Chat::Yellow,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
MessageString(Chat::Yellow, ClientString::RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
return false;
}
@ -1585,11 +1585,11 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
float dist = DistanceSquared(m_Position, other->GetPosition());
if(dist > range) {
LogCombat("Throwing attack out of range client should catch this. ([{}] > [{}]).\n", dist, range);
MessageString(Chat::Red,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
MessageString(Chat::Red, ClientString::TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
return;
}
else if(dist < (RuleI(Combat, MinRangedAttackDist)*RuleI(Combat, MinRangedAttackDist))){
MessageString(Chat::Yellow,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
MessageString(Chat::Yellow, ClientString::RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
return;
}
@ -1910,7 +1910,7 @@ void NPC::DoClassAttacks(Mob *target) {
type_of_pet != PetType::TargetLock &&
DistanceSquared(GetPosition(), target->GetPosition()) <= (RuleI(Pets, PetTauntRange) * RuleI(Pets, PetTauntRange))
) {
GetOwner()->MessageString(Chat::PetResponse, PET_TAUNTING);
GetOwner()->MessageString(Chat::PetResponse, ClientString::PET_TAUNTING);
Taunt(target->CastToNPC(), false);
}
@ -2256,7 +2256,7 @@ void Mob::Taunt(NPC *who, bool always_succeed, int chance_bonus, bool from_spell
level_difference < 0 ||
who->GetSpecialAbility(SpecialAbility::TauntImmunity)
) {
MessageString(Chat::SpellFailure, FAILED_TAUNT);
MessageString(Chat::SpellFailure, ClientString::FAILED_TAUNT);
return;
}
@ -2368,10 +2368,10 @@ void Mob::Taunt(NPC *who, bool always_succeed, int chance_bonus, bool from_spell
}
if (who->CanTalk()) {
who->SayString(SUCCESSFUL_TAUNT, GetCleanName());
who->SayString(ClientString::SUCCESSFUL_TAUNT, GetCleanName());
}
} else {
MessageString(Chat::Skills, FAILED_TAUNT);
MessageString(Chat::Skills, ClientString::FAILED_TAUNT);
}
// Modern Abilities
@ -2425,7 +2425,7 @@ void Mob::InstillDoubt(Mob *who) {
success = true;
//is there a success message?
} else {
MessageString(Chat::LightBlue,NOT_SCARING);
MessageString(Chat::LightBlue, ClientString::NOT_SCARING);
//Idea from WR:
/* if (target->IsNPC() && zone->random.Int(0,99) < 10 ) {
entity_list.MessageClose(target, false, 50, Chat::NPCRampage, "%s lashes out in anger!",target->GetName());
@ -2473,7 +2473,7 @@ int Mob::TryHeadShot(Mob *defender, EQ::skills::SkillType skillInUse)
chance += aabonuses.HeadShot[SBIndex::FINISHING_EFFECT_PROC_CHANCE] + spellbonuses.HeadShot[SBIndex::FINISHING_EFFECT_PROC_CHANCE] + itembonuses.HeadShot[SBIndex::FINISHING_EFFECT_PROC_CHANCE];
if (zone->random.Int(1, 1000) <= chance) {
entity_list.MessageCloseString(
this, false, 200, Chat::MeleeCrit, FATAL_BOW_SHOT,
this, false, 200, Chat::MeleeCrit, ClientString::FATAL_BOW_SHOT,
GetName());
return HeadShot_Dmg;
}
@ -2526,7 +2526,7 @@ int Mob::TryAssassinate(Mob *defender, EQ::skills::SkillType skillInUse)
if (Assassinate_Dmg && Assassinate_Level && (defender->GetLevel() <= Assassinate_Level)) {
if (zone->random.Int(1, 1000) <= chance) {
entity_list.MessageCloseString(
this, false, 200, Chat::MeleeCrit, ASSASSINATES,
this, false, 200, Chat::MeleeCrit, ClientString::ASSASSINATES,
GetName());
return Assassinate_Dmg;
}

View File

@ -552,7 +552,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(zone->random.Roll(RuleI(Spells, SuccorFailChance))) { //2% Fail chance by default
if(IsClient()) {
CastToClient()->MessageString(Chat::SpellFailure,SUCCOR_FAIL);
CastToClient()->MessageString(Chat::SpellFailure, ClientString::SUCCOR_FAIL);
}
break;
}
@ -752,7 +752,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
(caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))))
{
if (caster)
caster->MessageString(Chat::SpellFailure, IMMUNE_STUN);
caster->MessageString(Chat::SpellFailure, ClientString::IMMUNE_STUN);
} else {
int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
if (IsClient() || IsBot()) {
@ -769,7 +769,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
Stun(effect_value);
} else {
if (IsClient())
MessageString(Chat::Stun, SHAKE_OFF_STUN);
MessageString(Chat::Stun, ClientString::SHAKE_OFF_STUN);
LogCombat("Stun Resisted. We had [{}] percent resist chance", stun_resist);
}
@ -880,17 +880,17 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
{
uint8 bt = BodyType::Undead;
int MessageID = SENSE_UNDEAD;
int MessageID = ClientString::SENSE_UNDEAD;
if(effect == SpellEffect::SenseSummoned)
{
bt = BodyType::Summoned;
MessageID = SENSE_SUMMONED;
MessageID = ClientString::SENSE_SUMMONED;
}
else if(effect == SpellEffect::SenseAnimals)
{
bt = BodyType::Animal;
MessageID = SENSE_ANIMAL;
MessageID = ClientString::SENSE_ANIMAL;
}
Mob *ClosestMob = entity_list.GetClosestMobByBodyType(this, bt, true);
@ -904,7 +904,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
}
else
MessageString(Chat::Red, SENSE_NOTHING);
MessageString(Chat::Red, ClientString::SENSE_NOTHING);
}
}
break;
@ -989,13 +989,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
safe_delete(action_packet);
} else {
if (!zone->CanBind()) {
MessageString(Chat::SpellFailure, CANNOT_BIND);
MessageString(Chat::SpellFailure, ClientString::CANNOT_BIND);
break;
}
if (!zone->IsCity()) {
if (caster != this && !zone->IsSpecialBindLocation(GetPosition())) {
MessageString(Chat::SpellFailure, CANNOT_BIND);
MessageString(Chat::SpellFailure, ClientString::CANNOT_BIND);
break;
} else {
auto action_packet = new EQApplicationPacket(
@ -1090,7 +1090,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(zone->random.Roll(effect_value))
Gate(spells[spell_id].limit_value[i] - 1);
else if (caster)
caster->MessageString(Chat::SpellFailure,GATE_FAIL);
caster->MessageString(Chat::SpellFailure, ClientString::GATE_FAIL);
}
break;
}
@ -1102,7 +1102,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
if (caster) {
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
caster->MessageString(Chat::SpellFailure, ClientString::SPELL_NO_EFFECT, spells[spell_id].name);
}
break;
}
@ -1118,7 +1118,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
if (caster)
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
caster->MessageString(Chat::SpellFailure, ClientString::SPELL_NO_EFFECT, spells[spell_id].name);
break;
}
/*
@ -1149,7 +1149,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
if (caster)
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
caster->MessageString(Chat::SpellFailure, ClientString::SPELL_NO_EFFECT, spells[spell_id].name);
break;
}
@ -1297,7 +1297,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
#endif
if(GetPet())
{
MessageString(Chat::Shout, ONLY_ONE_PET);
MessageString(Chat::Shout, ClientString::ONLY_ONE_PET);
}
else
{
@ -1574,7 +1574,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
&& caster && (!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity)))))
{
if (caster)
caster->MessageString(Chat::Shout, IMMUNE_STUN);
caster->MessageString(Chat::Shout, ClientString::IMMUNE_STUN);
}
else
{
@ -1667,7 +1667,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (zone->random.Int(0, 99) > spells[spell_id].base_value[i]) {
SetFeigned(false);
entity_list.MessageCloseString(this, false, 200, 10, STRING_FEIGNFAILED, GetName());
entity_list.MessageCloseString(this, false, 200, 10, ClientString::STRING_FEIGNFAILED, GetName());
} else {
SetFeigned(true);
}
@ -1685,12 +1685,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if(caster == this)
{
MessageString(Chat::Spells,
SENTINEL_TRIG_YOU);
ClientString::SENTINEL_TRIG_YOU);
}
else
{
caster->MessageString(Chat::Spells,
SENTINEL_TRIG_OTHER, GetCleanName());
ClientString::SENTINEL_TRIG_OTHER, GetCleanName());
}
}
break;
@ -1837,26 +1837,26 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
Corpse *corpse = entity_list.GetCorpseByOwner(TargetClient);
if(corpse) {
if(TargetClient == CastToClient())
MessageString(Chat::LightBlue, SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
MessageString(Chat::LightBlue, ClientString::SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
else
MessageString(Chat::LightBlue, SUMMONING_CORPSE_OTHER, TargetClient->CastToMob()->GetCleanName());
MessageString(Chat::LightBlue, ClientString::SUMMONING_CORPSE_OTHER, TargetClient->CastToMob()->GetCleanName());
corpse->Summon(CastToClient(), true, true);
}
else {
// No corpse found in the zone
MessageString(Chat::LightBlue, CORPSE_CANT_SENSE);
MessageString(Chat::LightBlue, ClientString::CORPSE_CANT_SENSE);
}
}
else if (caster) {
char level[4];
ConvertArray(effect_value, level);
caster->MessageString(Chat::SpellFailure,
SPELL_LEVEL_REQ, level);
ClientString::SPELL_LEVEL_REQ, level);
}
}
else {
MessageString(Chat::LightBlue, TARGET_NOT_FOUND);
MessageString(Chat::LightBlue, ClientString::TARGET_NOT_FOUND);
LogError("[{}] attempted to cast spell id [{}] with spell effect SpellEffect::SummonCorpse, but could not cast target into a Client object", GetCleanName(), spell_id);
}
}
@ -1871,7 +1871,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
Group* group = client_target->GetGroup();
if (!group->IsGroupMember(caster)) {
if (caster != this) {
caster->MessageString(Chat::Red, SUMMON_ONLY_GROUP_CORPSE);
caster->MessageString(Chat::Red, ClientString::SUMMON_ONLY_GROUP_CORPSE);
break;
}
}
@ -1881,13 +1881,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
uint32 group_id = raid->GetGroup(caster->GetName());
if (group_id > 0 && group_id < MAX_RAID_GROUPS) {
if (client_target && raid->GetGroup(client_target->GetName()) != group_id) {
caster->MessageString(Chat::Red, SUMMON_ONLY_GROUP_CORPSE);
caster->MessageString(Chat::Red, ClientString::SUMMON_ONLY_GROUP_CORPSE);
break;
}
}
} else {
if (caster != this) {
caster->MessageString(Chat::Red, SUMMON_ONLY_GROUP_CORPSE);
caster->MessageString(Chat::Red, ClientString::SUMMON_ONLY_GROUP_CORPSE);
break;
}
}
@ -1904,12 +1904,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (caster == this) {
Message(Chat::Spells, "Summoning your corpses.");
} else {
caster->MessageString(Chat::Spells, SUMMONING_CORPSE_ZONE, client_target->GetCleanName());
caster->MessageString(Chat::Spells, ClientString::SUMMONING_CORPSE_ZONE, client_target->GetCleanName());
}
client_target->SummonAllCorpses(client_target->GetPosition());
}
} else {
MessageString(Chat::Spells, TARGET_NOT_FOUND);
MessageString(Chat::Spells, ClientString::TARGET_NOT_FOUND);
LogError("[{}] attempted to cast spell id [{}] with spell effect SpellEffect::SummonCorpseZone, but could not cast target into a Client object", GetCleanName(), spell_id);
}
}
@ -2236,7 +2236,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
if (IsClient()) {
if (caster->IsClient()) {
if (!entity_list.IsInSameGroupOrRaidGroup(caster->CastToClient(), CastToClient())) {
caster->MessageString(Chat::SpellFailure, TARGET_GROUP_MEMBER);
caster->MessageString(Chat::SpellFailure, ClientString::TARGET_GROUP_MEMBER);
break;
}
@ -2255,7 +2255,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), caster->GetX(),
caster->GetY(), caster->GetZ(), caster->GetHeading(), 2,
SummonPC);
MessageString(Chat::Spells, PLAYER_SUMMONED);
MessageString(Chat::Spells, ClientString::PLAYER_SUMMONED);
} else {
caster->Message(Chat::Red, "This spell can only be cast on players.");
}
@ -2364,7 +2364,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
break;
}
}
MessageString(Chat::Skills, ESCAPE);
MessageString(Chat::Skills, ClientString::ESCAPE);
} else{
entity_list.RemoveFromTargets(caster);
SetInvisible(Invisibility::Invisible);
@ -2938,7 +2938,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
case SpellEffect::MassGroupBuff:{
SetMGB(true);
MessageString(Chat::Disciplines, MGB_STRING);
MessageString(Chat::Disciplines, ClientString::MGB_STRING);
break;
}
@ -3068,12 +3068,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
break;
if (IsNPC() && GetSpecialAbility(SpecialAbility::StunImmunity)) {
caster->MessageString(Chat::SpellFailure, IMMUNE_STUN);
caster->MessageString(Chat::SpellFailure, ClientString::IMMUNE_STUN);
break;
}
if (IsNPC() && GetSpecialAbility(SpecialAbility::FearImmunity)) {
caster->MessageString(Chat::SpellFailure, IMMUNE_FEAR);
caster->MessageString(Chat::SpellFailure, ClientString::IMMUNE_FEAR);
break;
}
int max_level = 0;
@ -3091,7 +3091,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
Stun(spells[spell_id].base_value[i]);
}
else
caster->MessageString(Chat::SpellFailure, FEAR_TOO_HIGH);
caster->MessageString(Chat::SpellFailure, ClientString::FEAR_TOO_HIGH);
break;
}
@ -4124,7 +4124,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
case SpellEffect::InvisVsUndead2: {
if (!IsBardSong(buff.spellid)) {
if (buff.ticsremaining <= 3 && buff.ticsremaining > 1) {
MessageString(Chat::Spells, INVIS_BEGIN_BREAK);
MessageString(Chat::Spells, ClientString::INVIS_BEGIN_BREAK);
}
}
break;
@ -4643,7 +4643,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
if(p->IsPet())
notify = p->GetOwner();
if(p) {
notify->MessageString(Chat::SpellWornOff, SPELL_WORN_OFF_OF,
notify->MessageString(Chat::SpellWornOff, ClientString::SPELL_WORN_OFF_OF,
spells[buffs[slot].spellid].name, GetCleanName());
}
}
@ -6704,38 +6704,38 @@ int64 Mob::GetFocusEffect(focusType type, uint16 spell_id, Mob *caster, bool fro
if ((rand_effectiveness && UsedItem) || (realTotal != 0 && UsedItem)) {
// there are a crap ton more of these, I was able to verify these ones though
// the RNG effective ones appear to have a different message for failing to focus
uint32 string_id = BEGINS_TO_GLOW; // this is really just clicky message ...
uint32 string_id = ClientString::BEGINS_TO_GLOW; // this is really just clicky message ...
switch (type) {
case focusSpellHaste:
string_id = SHIMMERS_BRIEFLY;
string_id = ClientString::SHIMMERS_BRIEFLY;
break;
case focusManaCost: // this might be GROWS_DIM for fail
string_id = FLICKERS_PALE_LIGHT;
string_id = ClientString::FLICKERS_PALE_LIGHT;
break;
case focusSpellDuration:
string_id = SPARKLES;
string_id = ClientString::SPARKLES;
break;
case focusImprovedDamage:
case focusImprovedDamage2:
if (realTotal)
string_id = ALIVE_WITH_POWER;
string_id = ClientString::ALIVE_WITH_POWER;
else
string_id = SEEMS_DRAINED;
string_id = ClientString::SEEMS_DRAINED;
break;
case focusRange:
string_id = PULSES_WITH_LIGHT;
string_id = ClientString::PULSES_WITH_LIGHT;
break;
case focusSpellHateMod: // GLOWS_RED for increasing hate
string_id = GLOWS_BLUE;
string_id = ClientString::GLOWS_BLUE;
break;
case focusImprovedHeal:
if (realTotal)
string_id = FEEDS_WITH_POWER;
string_id = ClientString::FEEDS_WITH_POWER;
else
string_id = POWER_DRAIN_INTO;
string_id = ClientString::POWER_DRAIN_INTO;
break;
case focusReagentCost: // this might be GROWS_DIM for fail as well ...
string_id = BEGINS_TO_SHINE;
string_id = ClientString::BEGINS_TO_SHINE;
break;
default:
break;
@ -7234,10 +7234,10 @@ bool Mob::TryDeathSave() {
false,
200,
Chat::MeleeCrit,
DIVINE_INTERVENTION,
ClientString::DIVINE_INTERVENTION,
GetCleanName());
} else {
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, ClientString::DEATH_PACT, GetCleanName());
}
SendHPUpdate();
@ -7276,10 +7276,10 @@ bool Mob::TryDeathSave() {
false,
200,
Chat::MeleeCrit,
DIVINE_INTERVENTION,
ClientString::DIVINE_INTERVENTION,
GetCleanName());
} else {
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, ClientString::DEATH_PACT, GetCleanName());
}
SendHPUpdate();
@ -9927,12 +9927,12 @@ void Client::BreakFeignDeathWhenCastOn(bool IsResisted)
}
if(chance && (zone->random.Roll(chance))){
MessageString(Chat::SpellFailure,FD_CAST_ON_NO_BREAK);
MessageString(Chat::SpellFailure, ClientString::FD_CAST_ON_NO_BREAK);
return;
}
SetFeigned(false);
MessageString(Chat::SpellFailure,FD_CAST_ON);
MessageString(Chat::SpellFailure, ClientString::FD_CAST_ON);
}
}
@ -9962,7 +9962,7 @@ bool Mob::PassCharmTargetRestriction(Mob *target) {
}
if (target->IsClient() && IsClient()) {
MessageString(Chat::Red, CANNOT_AFFECT_PC);
MessageString(Chat::Red, ClientString::CANNOT_AFFECT_PC);
LogSpells("Spell casting canceled: Can not cast charm on a client.");
return false;
}
@ -9971,12 +9971,12 @@ bool Mob::PassCharmTargetRestriction(Mob *target) {
return false;
}
else if (GetPet() && IsClient()) {
MessageString(Chat::Red, ONLY_ONE_PET);
MessageString(Chat::Red, ClientString::ONLY_ONE_PET);
LogSpells("Spell casting canceled: Can not cast charm if you have a pet.");
return false;
}
else if (target->GetOwner()) {
MessageString(Chat::Red, CANNOT_CHARM);
MessageString(Chat::Red, ClientString::CANNOT_CHARM);
LogSpells("Spell casting canceled: Can not cast charm on a pet.");
return false;
}

View File

@ -235,7 +235,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
GetTarget()->GetMana() == 0
);
if (melee_block || caster_block) {
InterruptSpell(TARGET_NO_MANA, 0x121, spell_id);
InterruptSpell(ClientString::TARGET_NO_MANA, 0x121, spell_id);
return false;
}
}
@ -332,7 +332,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
// note that CheckFizzle itself doesn't let NPCs fizzle,
// but this code allows for it.
if (slot < CastingSlot::MaxGems && !CheckFizzle(spell_id)) {
int fizzle_msg = IsBardSong(spell_id) ? MISS_NOTE : SPELL_FIZZLE;
int fizzle_msg = IsBardSong(spell_id) ? ClientString::MISS_NOTE : ClientString::SPELL_FIZZLE;
uint32 use_mana = ((spells[spell_id].mana) / 4);
LogSpells("Spell casting canceled: fizzled. [{}] mana has been consumed", use_mana);
@ -352,7 +352,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
RuleI(Range, SpellMessages),
Chat::SpellFailure,
(IsClient() ? FilterPCSpells : FilterNPCSpells),
(fizzle_msg == MISS_NOTE ? MISSED_NOTE_OTHER : SPELL_FIZZLE_OTHER),
(fizzle_msg == ClientString::MISS_NOTE ? ClientString::MISSED_NOTE_OTHER : ClientString::SPELL_FIZZLE_OTHER),
0,
/*
MessageFormat: You miss a note, bringing your song to a close! (if missed note)
@ -409,7 +409,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
LogSpells("Spell Error: no target. spell=[{}]", spell_id);
if(IsClient()) {
//clients produce messages... npcs should not for this case
MessageString(Chat::Red, SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
InterruptSpell();
} else {
InterruptSpell(0, 0, 0); //the 0 args should cause no messages
@ -487,7 +487,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
if (RuleB(Spells, UseItemCastMessage) && IsClient() && slot == CastingSlot::Item && item_slot != 0xFFFFFFFF) {
auto item = CastToClient()->GetInv().GetItem(item_slot);
if (item && item->GetItem()) {
MessageString(Chat::FocusEffect, BEGINS_TO_GLOW, item->GetItem()->Name);
MessageString(Chat::FocusEffect, ClientString::BEGINS_TO_GLOW, item->GetItem()->Name);
}
}
@ -499,7 +499,7 @@ void Mob::DoSpellInterrupt(uint16 spell_id, int32 mana_cost, int my_curmana) {
LogSpells("Not enough mana spell [{}] curmana [{}] cost [{}]\n", spell_id, my_curmana, mana_cost);
if (IsClient()) {
//clients produce messages... npcs should not for this case
MessageString(Chat::Red, INSUFFICIENT_MANA);
MessageString(Chat::Red, ClientString::INSUFFICIENT_MANA);
InterruptSpell();
} else {
InterruptSpell(0, 0, 0); //the 0 args should cause no messages
@ -561,7 +561,7 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
Can not cast if spell
*/
if ((IsSilenced() && !IsDiscipline(spell_id))) {
MessageString(Chat::Red, SILENCED_STRING);
MessageString(Chat::Red, ClientString::SILENCED_STRING);
LogSpells("Spell casting canceled [{}] : can not cast spell when silenced.", spell_id);
return false;
}
@ -569,7 +569,7 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
Can not cast if discipline.
*/
if (IsAmnesiad() && IsDiscipline(spell_id)) {
MessageString(Chat::Red, MELEE_SILENCE);
MessageString(Chat::Red, ClientString::MELEE_SILENCE);
LogSpells("Spell casting canceled [{}] : can not use discipline with amnesia.", spell_id);
return false;
}
@ -607,10 +607,10 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
if (IsBeneficialSpell(spell_id)) {
if ((IsNPC() && IsEngaged()) || (IsClient() && CastToClient()->GetAggroCount())) {
if (IsDiscipline(spell_id)) {
MessageString(Chat::Red, NO_ABILITY_IN_COMBAT);
MessageString(Chat::Red, ClientString::NO_ABILITY_IN_COMBAT);
}
else {
MessageString(Chat::Red, NO_CAST_IN_COMBAT);
MessageString(Chat::Red, ClientString::NO_CAST_IN_COMBAT);
}
LogSpells("Spell casting canceled [{}] : can not use spell while in combat.", spell_id);
return false;
@ -621,10 +621,10 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
if (IsBeneficialSpell(spell_id)) {
if ((IsNPC() && !IsEngaged()) || (IsClient() && !CastToClient()->GetAggroCount())) {
if (IsDiscipline(spell_id)) {
MessageString(Chat::Red, NO_ABILITY_OUT_OF_COMBAT);
MessageString(Chat::Red, ClientString::NO_ABILITY_OUT_OF_COMBAT);
}
else {
MessageString(Chat::Red, NO_CAST_OUT_OF_COMBAT);
MessageString(Chat::Red, ClientString::NO_CAST_OUT_OF_COMBAT);
}
LogSpells("Spell casting canceled [{}] : can not use spell while out of combat.", spell_id);
return false;
@ -637,7 +637,7 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
if (IsClient() && !IsDiscipline(spell_id)) {
int chance = CastToClient()->GetFocusEffect(focusFcMute, spell_id);//client only
if (chance && zone->random.Roll(chance)) {
MessageString(Chat::Red, SILENCED_STRING);
MessageString(Chat::Red, ClientString::SILENCED_STRING);
LogSpells("Spell casting canceled: can not cast spell when silenced from SPA 357 FcMute.");
return(false);
}
@ -717,7 +717,7 @@ bool Mob::DoCastingChecksZoneRestrictions(bool check_on_casting, int32 spell_id)
[&]() { return !bypass_casting_restrictions && spells[spell_id].time_of_day == SpellTimeRestrictions::Day && !zone->zone_time.IsDayTime(); },
[&]() {
if (gm_bypass_message("spell daytime restrictions")) { return true; }
MessageString(Chat::Red, CAST_DAYTIME);
MessageString(Chat::Red, ClientString::CAST_DAYTIME);
return false;
}
},
@ -726,7 +726,7 @@ bool Mob::DoCastingChecksZoneRestrictions(bool check_on_casting, int32 spell_id)
[&]() { return !bypass_casting_restrictions && spells[spell_id].time_of_day == SpellTimeRestrictions::Night && !zone->zone_time.IsNightTime(); },
[&]() {
if (gm_bypass_message("spell nighttime restrictions")) return true;
MessageString(Chat::Red, CAST_NIGHTTIME);
MessageString(Chat::Red, ClientString::CAST_NIGHTTIME);
return false;
}
},
@ -735,7 +735,7 @@ bool Mob::DoCastingChecksZoneRestrictions(bool check_on_casting, int32 spell_id)
[&]() { return check_on_casting && !bypass_casting_restrictions && spells[spell_id].zone_type == 1 && !zone->CanCastOutdoor(); },
[&]() {
if (gm_bypass_message("zone outdoor restrictions")) return true;
MessageString(Chat::Red, CAST_OUTDOORS);
MessageString(Chat::Red, ClientString::CAST_OUTDOORS);
return false;
}
}
@ -812,7 +812,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
if (IsDetrimentalSpell(spell_id)) {
if (((spell_target->IsNPC() && spell_target->IsEngaged()) ||
(spell_target->IsClient() && spell_target->CastToClient()->GetAggroCount()))) {
MessageString(Chat::Red, SPELL_NO_EFFECT); // Unsure correct string
MessageString(Chat::Red, ClientString::SPELL_NO_EFFECT); // Unsure correct string
LogSpells("Spell casting canceled [{}] : can not use spell while your target is in combat.", spell_id);
return false;
}
@ -822,7 +822,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
if (IsDetrimentalSpell(spell_id)) {
if (((spell_target->IsNPC() && !spell_target->IsEngaged()) ||
(spell_target->IsClient() && !spell_target->CastToClient()->GetAggroCount()))) {
MessageString(Chat::Red, SPELL_NO_EFFECT); // Unsure correct string
MessageString(Chat::Red, ClientString::SPELL_NO_EFFECT); // Unsure correct string
LogSpells("Spell casting canceled [{}] : can not use spell while your target is out of combat.", spell_id);
return false;
}
@ -868,7 +868,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
*/
if (this == spell_target && IsLifetapSpell(spell_id)) {
LogSpells("You cannot lifetap yourself");
MessageString(Chat::SpellFailure, CANT_DRAIN_SELF);
MessageString(Chat::SpellFailure, ClientString::CANT_DRAIN_SELF);
return false;
}
/*
@ -876,14 +876,14 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
*/
if (this == spell_target && IsSacrificeSpell(spell_id)) {
LogSpells("You cannot sacrifice yourself");
MessageString(Chat::SpellFailure, CANNOT_SAC_SELF);
MessageString(Chat::SpellFailure, ClientString::CANNOT_SAC_SELF);
return false;
}
/*
Max level of target for harmony to take hold
*/
if (IsClient() && IsHarmonySpell(spell_id) && !HarmonySpellLevelCheck(spell_id, spell_target)) {
MessageString(Chat::SpellFailure, SPELL_NO_EFFECT);
MessageString(Chat::SpellFailure, ClientString::SPELL_NO_EFFECT);
LogSpells("Spell casting canceled [{}] : can not use harmony on this target.", spell_id);
return false;
}
@ -926,7 +926,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
}
if (cast_failed) {
MessageString(Chat::Red, TARGET_GROUP_MEMBER);
MessageString(Chat::Red, ClientString::TARGET_GROUP_MEMBER);
return false;
}
}
@ -1007,7 +1007,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
if (GetRawSkill(EQ::skills::SkillPercussionInstruments) > 0) // no skill increases if not trained in the instrument
CheckIncreaseSkill(EQ::skills::SkillPercussionInstruments, nullptr, -15);
else
MessageString(Chat::Red,NO_INSTRUMENT_SKILL); // tell the client that they need instrument training
MessageString(Chat::Red, ClientString::NO_INSTRUMENT_SKILL); // tell the client that they need instrument training
}
else
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
@ -1017,7 +1017,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
if (GetRawSkill(EQ::skills::SkillStringedInstruments) > 0)
CheckIncreaseSkill(EQ::skills::SkillStringedInstruments, nullptr, -15);
else
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
MessageString(Chat::Red, ClientString::NO_INSTRUMENT_SKILL);
}
else
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
@ -1027,7 +1027,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
if (GetRawSkill(EQ::skills::SkillWindInstruments) > 0)
CheckIncreaseSkill(EQ::skills::SkillWindInstruments, nullptr, -15);
else
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
MessageString(Chat::Red, ClientString::NO_INSTRUMENT_SKILL);
}
else
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
@ -1037,7 +1037,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
if (GetRawSkill(EQ::skills::SkillBrassInstruments) > 0)
CheckIncreaseSkill(EQ::skills::SkillBrassInstruments, nullptr, -15);
else
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
MessageString(Chat::Red, ClientString::NO_INSTRUMENT_SKILL);
}
else
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
@ -1290,7 +1290,7 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
}
if(casting_spell_aa_id && IsClient()) { //Rest AA Timer on failed cast
CastToClient()->MessageString(Chat::SpellFailure, ABILITY_FAILED);
CastToClient()->MessageString(Chat::SpellFailure, ClientString::ABILITY_FAILED);
CastToClient()->ResetAlternateAdvancementTimer(casting_spell_aa_id);
}
@ -1310,10 +1310,10 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
}
if(!message)
message = IsBardSong(spellid) ? SONG_ENDS_ABRUPTLY : INTERRUPT_SPELL;
message = IsBardSong(spellid) ? ClientString::SONG_ENDS_ABRUPTLY : ClientString::INTERRUPT_SPELL;
// clients need some packets
if (IsClient() && message != SONG_ENDS)
if (IsClient() && message != ClientString::SONG_ENDS)
{
// the interrupt message
outapp = new EQApplicationPacket(OP_InterruptCast, sizeof(InterruptCast_Struct));
@ -1332,20 +1332,20 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
// first figure out what message others should get
switch(message)
{
case SONG_ENDS:
message_other = SONG_ENDS_OTHER;
case ClientString::SONG_ENDS:
message_other = ClientString::SONG_ENDS_OTHER;
break;
case SONG_ENDS_ABRUPTLY:
message_other = SONG_ENDS_ABRUPTLY_OTHER;
case ClientString::SONG_ENDS_ABRUPTLY:
message_other = ClientString::SONG_ENDS_ABRUPTLY_OTHER;
break;
case MISS_NOTE:
message_other = MISSED_NOTE_OTHER;
case ClientString::MISS_NOTE:
message_other = ClientString::MISSED_NOTE_OTHER;
break;
case SPELL_FIZZLE:
message_other = SPELL_FIZZLE_OTHER;
case ClientString::SPELL_FIZZLE:
message_other = ClientString::SPELL_FIZZLE_OTHER;
break;
default:
message_other = INTERRUPT_SPELL_OTHER;
message_other = ClientString::INTERRUPT_SPELL_OTHER;
}
// this is the actual message, it works the same as a formatted message
@ -1370,7 +1370,7 @@ void Mob::StopCasting()
if (IsClient()) {
auto c = CastToClient();
if (casting_spell_aa_id) { //Rest AA Timer on failed cast
c->MessageString(Chat::SpellFailure, ABILITY_FAILED);
c->MessageString(Chat::SpellFailure, ClientString::ABILITY_FAILED);
c->ResetAlternateAdvancementTimer(casting_spell_aa_id);
}
@ -1431,7 +1431,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if(IsClient() && slot != CastingSlot::Item && slot != CastingSlot::PotionBelt && spells[spell_id].recast_time > 1000) { // 10 is item
if(!CastToClient()->GetPTimers().Expired(&database, pTimerSpellStart + spell_id, false)) {
//should we issue a message or send them a spell gem packet?
MessageString(Chat::Red, SPELL_RECAST);
MessageString(Chat::Red, ClientString::SPELL_RECAST);
LogSpells("Casting of [{}] canceled: spell reuse timer not expired", spell_id);
StopCasting();
return;
@ -1447,7 +1447,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
IsFromItem = true;
item = CastToClient()->GetInv().GetItem(inventory_slot); //checked for in reagents and charges.
if (CastToClient()->HasItemRecastTimer(spell_id, inventory_slot)) {
MessageString(Chat::Red, SPELL_RECAST);
MessageString(Chat::Red, ClientString::SPELL_RECAST);
LogSpells("Casting of [{}] canceled: item or augment spell reuse timer not expired", spell_id);
StopCasting();
return;
@ -1471,7 +1471,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
if (casting_spell_id != spell_id)
{
LogSpells("Casting of [{}] canceled: already casting", spell_id);
MessageString(Chat::Red,ALREADY_CASTING);
MessageString(Chat::Red, ClientString::ALREADY_CASTING);
InterruptSpell();
return;
}
@ -1572,13 +1572,13 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
}
// if we got here, we regained concentration
regain_conc = true;
MessageString(Chat::Spells, REGAIN_AND_CONTINUE);
MessageString(Chat::Spells, ClientString::REGAIN_AND_CONTINUE);
entity_list.MessageCloseString(
this,
true,
RuleI(Range, SpellMessages),
Chat::Spells,
OTHER_REGAIN_CAST,
ClientString::OTHER_REGAIN_CAST,
GetCleanName());
}
}
@ -1621,7 +1621,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
case INSTRUMENT_HAND_DRUM:
if(itembonuses.percussionMod == 0) { // check for the appropriate instrument type
HasInstrument = false;
c->MessageString(Chat::Red, SONG_NEEDS_DRUM); // send an error message if missing
c->MessageString(Chat::Red, ClientString::SONG_NEEDS_DRUM); // send an error message if missing
}
break;
@ -1629,7 +1629,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
case INSTRUMENT_WOODEN_FLUTE:
if(itembonuses.windMod == 0) {
HasInstrument = false;
c->MessageString(Chat::Red, SONG_NEEDS_WIND);
c->MessageString(Chat::Red, ClientString::SONG_NEEDS_WIND);
}
break;
@ -1637,7 +1637,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
case INSTRUMENT_LUTE:
if(itembonuses.stringedMod == 0) {
HasInstrument = false;
c->MessageString(Chat::Red, SONG_NEEDS_STRINGS);
c->MessageString(Chat::Red, ClientString::SONG_NEEDS_STRINGS);
}
break;
@ -1645,7 +1645,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
case INSTRUMENT_HORN:
if(itembonuses.brassMod == 0) {
HasInstrument = false;
c->MessageString(Chat::Red, SONG_NEEDS_BRASS);
c->MessageString(Chat::Red, ClientString::SONG_NEEDS_BRASS);
}
break;
@ -1677,13 +1677,13 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
{
if (!missingreags)
{
c->MessageString(Chat::Red, MISSING_SPELL_COMP);
c->MessageString(Chat::Red, ClientString::MISSING_SPELL_COMP);
missingreags=true;
}
const EQ::ItemData *item = database.GetItem(component);
if(item) {
c->MessageString(Chat::Red, MISSING_SPELL_COMP_ITEM, item->Name);
c->MessageString(Chat::Red, ClientString::MISSING_SPELL_COMP_ITEM, item->Name);
LogSpells("Spell [{}]: Canceled. Missing required reagent [{}] ([{}])", spell_id, item->Name, component);
}
else {
@ -1938,7 +1938,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if (!spell_target)
{
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
MessageString(Chat::Red, SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false; // can't cast these unless we have a target
}
CastAction = SingleTarget;
@ -1957,9 +1957,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
//invalid target
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (undead)", spell_id, mob_body);
if(!spell_target)
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
else
MessageString(Chat::Red,CANNOT_AFFECT_NPC);
MessageString(Chat::Red, ClientString::CANNOT_AFFECT_NPC);
return false;
}
CastAction = SingleTarget;
@ -1971,7 +1971,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
{
//invalid target
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (summoned)", spell_id, mob_body);
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false;
}
CastAction = SingleTarget;
@ -1986,7 +1986,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (summoned pet)",
spell_id, mob_body);
MessageString(Chat::Red, SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false;
}
@ -2010,9 +2010,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
//invalid target
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (want body Type [{}])", spell_id, mob_body, target_bt);
if(!spell_target)
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
else
MessageString(Chat::Red,CANNOT_AFFECT_NPC);
MessageString(Chat::Red, ClientString::CANNOT_AFFECT_NPC);
return false;
}
CastAction = SingleTarget;
@ -2027,7 +2027,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
LogSpells("Spell [{}] canceled: invalid target (ldon object)", spell_id);
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false;
}
else
@ -2035,14 +2035,14 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target->IsNPC())
{
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false;
}
if(spell_target->GetClass() != Class::LDoNTreasure)
{
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false;
}
}
@ -2051,7 +2051,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false; // can't cast these unless we have a target
}
CastAction = SingleTarget;
@ -2063,10 +2063,10 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target || !spell_target->IsPlayerCorpse())
{
LogSpells("Spell [{}] canceled: invalid target (corpse)", spell_id);
uint32 message = ONLY_ON_CORPSES;
if(!spell_target) message = SPELL_NEED_TAR;
else if(!spell_target->IsCorpse()) message = ONLY_ON_CORPSES;
else if(!spell_target->IsPlayerCorpse()) message = CORPSE_NOT_VALID;
uint32 message = ClientString::ONLY_ON_CORPSES;
if(!spell_target) message = ClientString::SPELL_NEED_TAR;
else if(!spell_target->IsCorpse()) message = ClientString::ONLY_ON_CORPSES;
else if(!spell_target->IsPlayerCorpse()) message = ClientString::CORPSE_NOT_VALID;
MessageString(Chat::Red, message);
return false;
}
@ -2086,7 +2086,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if (!spell_target) {
LogSpells("Spell [{}] canceled: invalid target (no pet)", spell_id);
MessageString(Chat::Red, NO_PET);
MessageString(Chat::Red, ClientString::NO_PET);
return false; // Can't cast these unless we have a target
}
@ -2158,7 +2158,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
LogSpells("Spell [{}] canceled: invalid target (AOE)", spell_id);
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false;
}
ae_center = spell_target;
@ -2190,7 +2190,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
}
if (spell_target && spell_target->IsPet() && spells[spell_id].target_type == ST_GroupNoPets) {
MessageString(Chat::Red, NO_CAST_ON_PET);
MessageString(Chat::Red, ClientString::NO_CAST_ON_PET);
return false;
}
@ -2202,7 +2202,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(!spell_target)
{
LogSpells("Spell [{}] canceled: invalid target (Group Required: Single Target)", spell_id);
MessageString(Chat::Red,SPELL_NEED_TAR);
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
return false;
}
@ -2316,14 +2316,14 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
if(group_id_caster == 0 || group_id_target == 0)
{
LogSpells("Spell [{}] canceled: Attempted to cast a Single Target Group spell on a ungrouped member", spell_id);
MessageString(Chat::Red, TARGET_GROUP_MEMBER);
MessageString(Chat::Red, ClientString::TARGET_GROUP_MEMBER);
return false;
}
if(group_id_caster != group_id_target)
{
LogSpells("Spell [{}] canceled: Attempted to cast a Single Target Group spell on a ungrouped member", spell_id);
MessageString(Chat::Red, TARGET_GROUP_MEMBER);
MessageString(Chat::Red, ClientString::TARGET_GROUP_MEMBER);
return false;
}
@ -2508,7 +2508,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
if (!spells[spell_id].npc_no_los && spell_target && IsDetrimentalSpell(spell_id) && (!CheckLosFN(spell_target) || !CheckWaterLoS(spell_target)) && !IsHarmonySpell(spell_id) && spells[spell_id].target_type != ST_TargetOptional)
{
LogSpells("Spell [{}]: cannot see target [{}]", spell_id, spell_target->GetName());
MessageString(Chat::Red,CANT_SEE_TARGET);
MessageString(Chat::Red, ClientString::CANT_SEE_TARGET);
return false;
}
@ -2535,13 +2535,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
if(dist2 > range2) {
//target is out of range.
LogSpells("Spell [{}]: Spell target is out of range (squared: [{}] > [{}])", spell_id, dist2, range2);
MessageString(Chat::Red, TARGET_OUT_OF_RANGE);
MessageString(Chat::Red, ClientString::TARGET_OUT_OF_RANGE);
return(false);
}
else if (dist2 < min_range2){
//target is too close range.
LogSpells("Spell [{}]: Spell target is too close (squared: [{}] < [{}])", spell_id, dist2, min_range2);
MessageString(Chat::Red, TARGET_TOO_CLOSE);
MessageString(Chat::Red, ClientString::TARGET_TOO_CLOSE);
return(false);
}
@ -2556,13 +2556,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
if(dist2 > range2) {
//target is out of range.
LogSpells("Spell [{}]: Spell target is out of range (squared: [{}] > [{}])", spell_id, dist2, range2);
MessageString(Chat::Red, TARGET_OUT_OF_RANGE);
MessageString(Chat::Red, ClientString::TARGET_OUT_OF_RANGE);
return(false);
}
else if (dist2 < min_range2){
//target is too close range.
LogSpells("Spell [{}]: Spell target is too close (squared: [{}] < [{}])", spell_id, dist2, min_range2);
MessageString(Chat::Red, TARGET_TOO_CLOSE);
MessageString(Chat::Red, ClientString::TARGET_TOO_CLOSE);
return(false);
}
@ -3112,7 +3112,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
if (spellid1 == spellid2 ) {
if (spellid1 == SPELL_EYE_OF_ZOMM && spellid2 == SPELL_EYE_OF_ZOMM) {//only the original Eye of Zomm spell will not take hold if affect is already on you, other versions client fades the buff as soon as cast.
MessageString(Chat::Red, SPELL_NO_HOLD);
MessageString(Chat::Red, ClientString::SPELL_NO_HOLD);
return -1;
}
@ -3182,7 +3182,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
if (spellbonuses.Screech == 1) {
if (effect2 == SpellEffect::Screech && sp2.base_value[i] == -1) {
MessageString(Chat::SpellFailure, SCREECH_BUFF_BLOCK, sp2.name);
MessageString(Chat::SpellFailure, ClientString::SCREECH_BUFF_BLOCK, sp2.name);
return -1;
}
}
@ -3497,7 +3497,7 @@ bool Mob::CheckSpellLevelRestriction(Mob *caster, uint16 spell_id)
if (!can_cast) {
LogSpells("Spell [{}] failed: recipient did not meet the level restrictions", spell_id);
if (!IsBardSong(spell_id)) {
caster->MessageString(Chat::SpellFailure, SPELL_TOO_POWERFUL);
caster->MessageString(Chat::SpellFailure, ClientString::SPELL_TOO_POWERFUL);
}
}
@ -3932,7 +3932,7 @@ bool Mob::SpellOnTarget(
!IsEffectInSpell(spell_id, SpellEffect::BindSight)
) {
if (!IsClient() || !CastToClient()->GetGM()) {
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
MessageString(Chat::SpellFailure, ClientString::SPELL_NO_HOLD);
return false;
}
}
@ -4153,7 +4153,7 @@ bool Mob::SpellOnTarget(
if (!RuleB(Spells, AllowDoubleInvis) && !IsActiveBardSong(spell_id)) {
if (IsEffectInSpell(spell_id, SpellEffect::Invisibility)) {
if (spelltar->invisible) {
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
spelltar->MessageString(Chat::SpellFailure, ClientString::ALREADY_INVIS, GetCleanName());
safe_delete(action_packet);
return false;
}
@ -4161,7 +4161,7 @@ bool Mob::SpellOnTarget(
if (IsEffectInSpell(spell_id, SpellEffect::InvisVsUndead)) {
if (spelltar->invisible_undead) {
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
spelltar->MessageString(Chat::SpellFailure, ClientString::ALREADY_INVIS, GetCleanName());
safe_delete(action_packet);
return false;
}
@ -4169,7 +4169,7 @@ bool Mob::SpellOnTarget(
if (IsEffectInSpell(spell_id, SpellEffect::InvisVsAnimals)) {
if (spelltar->invisible_animals) {
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
spelltar->MessageString(Chat::SpellFailure, ClientString::ALREADY_INVIS, GetCleanName());
safe_delete(action_packet);
return false;
}
@ -4267,7 +4267,7 @@ bool Mob::SpellOnTarget(
spelltar->GetName(),
IsBeneficialAllowed(spelltar)
);
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
MessageString(Chat::SpellFailure, ClientString::SPELL_NO_HOLD);
}
safe_delete(action_packet);
return false;
@ -4284,7 +4284,7 @@ bool Mob::SpellOnTarget(
GetName(),
spelltar->GetName()
);
spelltar->MessageString(Chat::SpellFailure, YOU_ARE_PROTECTED, GetCleanName());
spelltar->MessageString(Chat::SpellFailure, ClientString::YOU_ARE_PROTECTED, GetCleanName());
safe_delete(action_packet);
return false;
}
@ -4324,7 +4324,7 @@ bool Mob::SpellOnTarget(
IsHarmonySpell(spell_id) &&
!HarmonySpellLevelCheck(spell_id, spelltar)
) {
MessageString(Chat::SpellFailure, SPELL_NO_EFFECT);
MessageString(Chat::SpellFailure, ClientString::SPELL_NO_EFFECT);
safe_delete(action_packet);
return false;
}
@ -4338,7 +4338,7 @@ bool Mob::SpellOnTarget(
focus = CalcFocusEffect(focusBlockNextSpell, buffs[b].spellid, spell_id);
if (focus) {
CheckNumHitsRemaining(NumHit::MatchingSpells, b);
MessageString(Chat::SpellFailure, SPELL_WOULDNT_HOLD);
MessageString(Chat::SpellFailure, ClientString::SPELL_WOULDNT_HOLD);
safe_delete(action_packet);
return false;
}
@ -4441,12 +4441,12 @@ bool Mob::SpellOnTarget(
false, /* Skip Sender */
RuleI(Range, SpellMessages), /* Range */
Chat::Spells, /* Type */
SPELL_REFLECT, /* String ID */
ClientString::SPELL_REFLECT, /* String ID */
GetCleanName(), /* Message 1 */
spelltar->GetCleanName() /* Message 2 */
);
} else {
MessageString(Chat::Spells, SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
MessageString(Chat::Spells, ClientString::SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
}
CheckNumHitsRemaining(NumHit::ReflectSpell);
@ -4499,11 +4499,11 @@ bool Mob::SpellOnTarget(
LogSpells("Spell [{}] was completely resisted by [{}]", spell_id, spelltar->GetName());
if (spells[spell_id].resist_type == RESIST_PHYSICAL){
MessageString(Chat::SpellFailure, PHYSICAL_RESIST_FAIL,spells[spell_id].name);
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
MessageString(Chat::SpellFailure, ClientString::PHYSICAL_RESIST_FAIL,spells[spell_id].name);
spelltar->MessageString(Chat::SpellFailure, ClientString::YOU_RESIST, spells[spell_id].name);
} else {
MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
MessageString(Chat::SpellFailure, ClientString::TARGET_RESISTED, spells[spell_id].name);
spelltar->MessageString(Chat::SpellFailure, ClientString::YOU_RESIST, spells[spell_id].name);
if (IsBot() && RuleB(Bots, ShowResistMessagesToOwner)) {
CastToBot()->GetBotOwner()->Message
@ -4620,7 +4620,7 @@ bool Mob::SpellOnTarget(
// spell. It's most likely a buff that can't stack.
LogSpells("Spell [{}] could not apply its effects [{}] -> [{}]\n", spell_id, GetName(), spelltar->GetName());
if (casting_spell_aa_id) {
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
MessageString(Chat::SpellFailure, ClientString::SPELL_NO_HOLD);
if (RuleB(Spells, LegacyManaburn) && IsClient() && casting_spell_aa_id == aaManaBurn) {
StopCasting();
}
@ -5085,7 +5085,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
{
if(GetSpecialAbility(SpecialAbility::MesmerizeImmunity)) {
LogSpells("We are immune to Mez spells");
caster->MessageString(Chat::SpellFailure, CANNOT_MEZ);
caster->MessageString(Chat::SpellFailure, ClientString::CANNOT_MEZ);
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -5103,7 +5103,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
(!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))
{
LogSpells("Our level ([{}]) is higher than the limit of this Mez spell ([{}])", GetLevel(), spells[spell_id].max_value[effect_index]);
caster->MessageString(Chat::SpellFailure, CANNOT_MEZ_WITH_SPELL);
caster->MessageString(Chat::SpellFailure, ClientString::CANNOT_MEZ_WITH_SPELL);
AddToHateList(caster, 1,0,true,false,false,spell_id);
return true;
}
@ -5113,7 +5113,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(GetSpecialAbility(SpecialAbility::SlowImmunity) && IsEffectInSpell(spell_id, SpellEffect::AttackSpeed))
{
LogSpells("We are immune to Slow spells");
caster->MessageString(Chat::Red, IMMUNE_ATKSPEED);
caster->MessageString(Chat::Red, ClientString::IMMUNE_ATKSPEED);
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -5129,7 +5129,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
effect_index = GetSpellEffectIndex(spell_id, SpellEffect::Fear);
if(GetSpecialAbility(SpecialAbility::FearImmunity)) {
LogSpells("We are immune to Fear spells");
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, ClientString::IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -5140,13 +5140,13 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
} else if(IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false))
{
LogSpells("Clients cannot fear eachother!");
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, ClientString::IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
return true;
}
else if(GetLevel() > spells[spell_id].max_value[effect_index] && spells[spell_id].max_value[effect_index] != 0)
{
LogSpells("Level is [{}], cannot be feared by this spell", GetLevel());
caster->MessageString(Chat::Shout, FEAR_TOO_HIGH);
caster->MessageString(Chat::Shout, ClientString::FEAR_TOO_HIGH);
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if (aggro > 0) {
AddToHateList(caster, aggro);
@ -5159,7 +5159,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
{
Message(Chat::Red, "Your are immune to fear.");
LogSpells("Clients has WarCry effect, immune to fear!");
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, ClientString::IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
return true;
}
}
@ -5169,7 +5169,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(GetSpecialAbility(SpecialAbility::CharmImmunity))
{
LogSpells("We are immune to Charm spells");
caster->MessageString(Chat::Red, CANNOT_CHARM); // need to verify message type, not in MQ2Cast for easy look up
caster->MessageString(Chat::Red, ClientString::CANNOT_CHARM); // need to verify message type, not in MQ2Cast for easy look up
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -5198,11 +5198,11 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if (RuleB(Spells, CharmAggroOverLevel)) {
int64 aggro = caster->CheckAggroAmount(spell_id, this);
aggro > 0 ? AddToHateList(caster, aggro) : AddToHateList(caster, 1, 0, true, false, false, spell_id);
caster->MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
caster->MessageString(Chat::SpellFailure, ClientString::TARGET_RESISTED, spells[spell_id].name);
return true;
}
caster->MessageString(Chat::Red, CANNOT_CHARM_YET); // need to verify message type, not in MQ2Cast for easy look up<Paste>
caster->MessageString(Chat::Red, ClientString::CANNOT_CHARM_YET); // need to verify message type, not in MQ2Cast for easy look up<Paste>
AddToHateList(caster, 1,0,true,false,false,spell_id);
return true;
}
@ -5217,7 +5217,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
{
if(GetSpecialAbility(SpecialAbility::SnareImmunity)) {
LogSpells("We are immune to Snare spells");
caster->MessageString(Chat::Red, IMMUNE_MOVEMENT);
caster->MessageString(Chat::Red, ClientString::IMMUNE_MOVEMENT);
int32 aggro = caster->CheckAggroAmount(spell_id, this);
if(aggro > 0) {
AddToHateList(caster, aggro);
@ -5233,7 +5233,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(this == caster)
{
LogSpells("You cannot lifetap yourself");
caster->MessageString(Chat::SpellFailure, CANT_DRAIN_SELF);
caster->MessageString(Chat::SpellFailure, ClientString::CANT_DRAIN_SELF);
return true;
}
}
@ -5243,7 +5243,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
if(this == caster)
{
LogSpells("You cannot sacrifice yourself");
caster->MessageString(Chat::SpellFailure, CANNOT_SAC_SELF);
caster->MessageString(Chat::SpellFailure, ClientString::CANNOT_SAC_SELF);
return true;
}
}
@ -7297,7 +7297,7 @@ void Mob::DoBardCastingFromItemClick(bool is_casting_bard_song, uint32 cast_time
EQApplicationPacket *outapp = nullptr;
outapp = new EQApplicationPacket(OP_InterruptCast, sizeof(InterruptCast_Struct));
InterruptCast_Struct* ic = (InterruptCast_Struct*)outapp->pBuffer;
ic->messageid = SONG_ENDS;
ic->messageid = ClientString::SONG_ENDS;
ic->spawnid = GetID();
outapp->priority = 5;
CastToClient()->QueuePacket(outapp);
@ -7436,7 +7436,7 @@ bool Mob::CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot) {
RecordPlayerEventLogWithClient(CastToClient(), PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
}
else {
MessageString(Chat::Red, MUST_EQUIP_ITEM);
MessageString(Chat::Red, ClientString::MUST_EQUIP_ITEM);
}
return(false);
}
@ -7458,7 +7458,7 @@ bool Mob::CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot) {
}
else
{
MessageString(Chat::Red, CANNOT_USE_ITEM);
MessageString(Chat::Red, ClientString::CANNOT_USE_ITEM);
}
}
return(false);
@ -7475,7 +7475,7 @@ bool Mob::CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot) {
RecordPlayerEventLogWithClient(CastToClient(), PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
}
else {
MessageString(Chat::Red, MUST_EQUIP_ITEM);
MessageString(Chat::Red, ClientString::MUST_EQUIP_ITEM);
}
return(false);
}

File diff suppressed because it is too large Load Diff

View File

@ -866,7 +866,7 @@ int ClientTaskState::IncrementDoneCount(
}
for (int i = 0; i < msg_count; ++i) {
client->MessageString(Chat::DefaultText, TASK_UPDATED, task_data->title.c_str());
client->MessageString(Chat::DefaultText, ClientString::TASK_UPDATED, task_data->title.c_str());
}
}
@ -886,7 +886,7 @@ int ClientTaskState::IncrementDoneCount(
LogTasks("task_complete is [{}]", task_complete);
// shared tasks only send update messages on activity completion
if (task_data->type == TaskType::Shared) {
client->MessageString(Chat::DefaultText, TASK_UPDATED, task_data->title.c_str());
client->MessageString(Chat::DefaultText, ClientString::TASK_UPDATED, task_data->title.c_str());
}
// and by the 'Task Stage Completed' message
client->SendTaskActivityComplete(info->task_id, activity_id, task_index, task_data->type);
@ -1024,7 +1024,7 @@ void ClientTaskState::RewardTask(Client *c, const TaskInformation *ti, ClientTas
int16_t slot = c->GetInv().FindFreeSlot(inst->IsClassBag(), true, inst->GetItem()->Size);
c->SummonItem(item_id, charges, 0, 0, 0, 0, 0, 0, false, slot);
}
c->MessageString(Chat::Yellow, YOU_HAVE_BEEN_GIVEN, inst->GetItem()->Name);
c->MessageString(Chat::Yellow, ClientString::YOU_HAVE_BEEN_GIVEN, inst->GetItem()->Name);
}
}
}
@ -2041,7 +2041,7 @@ void ClientTaskState::AcceptNewTask(
}
if (max_tasks) {
client->MessageString(Chat::Yellow, MAX_ACTIVE_TASKS, ".", ".", client->GetName());
client->MessageString(Chat::Yellow, ClientString::MAX_ACTIVE_TASKS, ".", ".", client->GetName());
return;
}
@ -2057,7 +2057,7 @@ void ClientTaskState::AcceptNewTask(
}
if (enforce_level_requirement && !TaskManager::Instance()->ValidateLevel(task_id, client->GetLevel())) {
client->MessageString(Chat::Yellow, TASK_NOT_RIGHT_LEVEL);
client->MessageString(Chat::Yellow, ClientString::TASK_NOT_RIGHT_LEVEL);
return;
}
@ -2140,7 +2140,7 @@ void ClientTaskState::AcceptNewTask(
// This shouldn't happen unless there is a bug in the handling of ActiveTaskCount somewhere
if (active_slot == nullptr) {
client->MessageString(Chat::Yellow, MAX_ACTIVE_TASKS, ".", ".", client->GetName());
client->MessageString(Chat::Yellow, ClientString::MAX_ACTIVE_TASKS, ".", ".", client->GetName());
return;
}
@ -2194,7 +2194,7 @@ void ClientTaskState::AcceptNewTask(
TaskManager::Instance()->SendSingleActiveTaskToClient(client, *active_slot, false, true);
client->StartTaskRequestCooldownTimer();
client->MessageString(Chat::DefaultText, YOU_ASSIGNED_TASK, task->title.c_str());
client->MessageString(Chat::DefaultText, ClientString::YOU_ASSIGNED_TASK, task->title.c_str());
TaskManager::Instance()->SaveClientState(client, this);

View File

@ -594,7 +594,7 @@ void TaskManager::TaskSetSelector(Client* client, Mob* mob, int task_set_id, boo
}
if (m_task_sets[task_set_id].empty()) {
client->MessageString(Chat::Yellow, NO_TASK_OFFERS, ".", ".", client->GetName());
client->MessageString(Chat::Yellow, ClientString::NO_TASK_OFFERS, ".", ".", client->GetName());
return;
}
@ -632,7 +632,7 @@ void TaskManager::TaskSetSelector(Client* client, Mob* mob, int task_set_id, boo
SendTaskSelector(client, mob, task_list);
}
else {
client->MessageString(Chat::Yellow, NO_TASK_OFFERS, ".", ".", client->GetName());
client->MessageString(Chat::Yellow, ClientString::NO_TASK_OFFERS, ".", ".", client->GetName());
}
}
@ -684,7 +684,7 @@ void TaskManager::TaskQuestSetSelector(Client* client, Mob* mob, const std::vect
SendTaskSelector(client, mob, task_list);
}
else {
client->MessageString(Chat::Yellow, NO_TASK_OFFERS, ".", ".", client->GetName());
client->MessageString(Chat::Yellow, ClientString::NO_TASK_OFFERS, ".", ".", client->GetName());
}
}

View File

@ -136,7 +136,7 @@ void Client::SendTaskRequestCooldownTimerMessage()
if (HasTaskRequestCooldownTimer())
{
uint32_t seconds = task_request_timer.GetRemainingTime() / 1000;
MessageString(Chat::Yellow, TASK_REQUEST_COOLDOWN_TIMER,
MessageString(Chat::Yellow, ClientString::TASK_REQUEST_COOLDOWN_TIMER,
".", ".", // args start at %3 for this eqstr
GetName(),
fmt::format_int(seconds / 60).c_str(), // minutes

View File

@ -123,7 +123,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
RuleB(Inventory, EnforceAugmentRestriction) &&
user->IsAugmentRestricted(tobe_auged->GetItemType(), auged_with->GetAugmentRestriction())
) {
user->MessageString(Chat::Red, AUGMENT_RESTRICTED);
user->MessageString(Chat::Red, ClientString::AUGMENT_RESTRICTED);
return;
}
@ -349,13 +349,13 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
Strings::ToInt(container->GetItem()->IDFile + 2)
);
user->MessageString(Chat::LightBlue, TRANSFORM_COMPLETE, inst->GetItem()->Name);
user->MessageString(Chat::LightBlue, ClientString::TRANSFORM_COMPLETE, inst->GetItem()->Name);
if (RuleB(Inventory, DeleteTransformationMold)) {
user->DeleteItemInInventory(in_combine->container_slot, 0, true);
}
}
else if (inst) {
user->MessageString(Chat::LightBlue, TRANSFORM_FAILED, inst->GetItem()->Name);
user->MessageString(Chat::LightBlue, ClientString::TRANSFORM_FAILED, inst->GetItem()->Name);
}
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
@ -379,10 +379,10 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
user->DeleteItemInInventory(EQ::InventoryProfile::CalcSlotId(in_combine->container_slot, 0), 0, true);
container->Clear();
user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQ::invslot::slotCursor, 0, 0);
user->MessageString(Chat::LightBlue, TRANSFORM_COMPLETE, inst->GetItem()->Name);
user->MessageString(Chat::LightBlue, ClientString::TRANSFORM_COMPLETE, inst->GetItem()->Name);
}
else if (inst) {
user->MessageString(Chat::LightBlue, DETRANSFORM_FAILED, inst->GetItem()->Name);
user->MessageString(Chat::LightBlue, ClientString::DETRANSFORM_FAILED, inst->GetItem()->Name);
}
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
@ -407,7 +407,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
LogTradeskillsDetail("Check 2");
if (!is_augmented) {
user->MessageString(Chat::Emote, TRADESKILL_NOCOMBINE);
user->MessageString(Chat::Emote, ClientString::TRADESKILL_NOCOMBINE);
} else {
user->Message(Chat::Emote, "You must remove augments from all component items before you can attempt this combine.");
}
@ -536,7 +536,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
// Update Made count
if (success) {
if (!spec.has_learnt && ((spec.must_learn&0x10) != 0x10)) {
user->MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
user->MessageString(Chat::LightBlue, ClientString::TRADESKILL_LEARN_RECIPE, spec.name.c_str());
}
database.UpdateRecipeMadecount(spec.recipe_id, user->CharacterID(), spec.madecount+1);
}
@ -726,13 +726,13 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
safe_delete(outapp);
user->MessageString(Chat::Skills, TRADESKILL_MISSING_COMPONENTS);
user->MessageString(Chat::Skills, ClientString::TRADESKILL_MISSING_COMPONENTS);
for (auto it = MissingItems.begin(); it != MissingItems.end(); ++it) {
const EQ::ItemData* item = database.GetItem(*it);
if(item)
user->MessageString(Chat::Skills, TRADESKILL_MISSING_ITEM, item->Name);
user->MessageString(Chat::Skills, ClientString::TRADESKILL_MISSING_ITEM, item->Name);
}
return;
@ -786,7 +786,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
if (success) {
if (!spec.has_learnt && ((spec.must_learn & 0x10) != 0x10)) {
user->MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
user->MessageString(Chat::LightBlue, ClientString::TRADESKILL_LEARN_RECIPE, spec.name.c_str());
}
database.UpdateRecipeMadecount(spec.recipe_id, user->CharacterID(), spec.madecount+1);
}
@ -1104,7 +1104,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
chance = 100;
}
MessageString(Chat::Emote, TRADESKILL_TRIVIAL);
MessageString(Chat::Emote, ClientString::TRADESKILL_TRIVIAL);
} else if(chance < 5) {
// Minimum chance is always 5
chance = 5;
@ -1141,7 +1141,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
}
MessageString(Chat::LightBlue, TRADESKILL_SUCCEED, spec->name.c_str());
MessageString(Chat::LightBlue, ClientString::TRADESKILL_SUCCEED, spec->name.c_str());
LogTradeskills("Tradeskill success");
@ -1189,7 +1189,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
if(over_trivial < 0)
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
MessageString(Chat::Emote,TRADESKILL_FAILED);
MessageString(Chat::Emote, ClientString::TRADESKILL_FAILED);
LogTradeskills("Tradeskill failed");
if (GetGroup())
@ -1714,7 +1714,7 @@ void Client::LearnRecipe(uint32 recipe_id)
return;
}
MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, tradeskill_recipe.name.c_str());
MessageString(Chat::LightBlue, ClientString::TRADESKILL_LEARN_RECIPE, tradeskill_recipe.name.c_str());
database.QueryDatabase(
fmt::format(
@ -1921,7 +1921,7 @@ bool Client::CheckTradeskillLoreConflict(int32 recipe_id)
linker.SetLinkType(EQ::saylink::SayLinkItemData);
linker.SetItemData(tre_inst);
auto item_link = linker.GenerateLink();
MessageString(Chat::Red, TRADESKILL_COMBINE_LORE, item_link.c_str());
MessageString(Chat::Red, ClientString::TRADESKILL_COMBINE_LORE, item_link.c_str());
return true;
}
}

View File

@ -914,7 +914,7 @@ void Client::TraderStartTrader(const EQApplicationPacket *app)
safe_delete(outapp);
}
MessageString(Chat::Yellow, TRADER_MODE_ON);
MessageString(Chat::Yellow, ClientString::TRADER_MODE_ON);
SetTrader(true);
SendTraderMode(TraderOn);
SendBecomeTraderToWorld(this, TraderOn);
@ -1571,7 +1571,7 @@ void Client::SendBazaarWelcome()
void Client::SendBarterWelcome()
{
const auto results = BuyerBuyLinesRepository::GetWelcomeData(database);
MessageString(Chat::White, BUYER_WELCOME, std::to_string(results.count_of_buyers).c_str());
MessageString(Chat::White, ClientString::BUYER_WELCOME, std::to_string(results.count_of_buyers).c_str());
}
void Client::DoBazaarSearch(BazaarSearchCriteria_Struct search_criteria)
@ -1823,7 +1823,7 @@ void Client::ShowBuyLines(const EQApplicationPacket *app)
if (!buyer || buyer->GetCustomerID()) {
bir->approval = 0; // Tell the client that the Buyer is unavailable
QueuePacket(app);
MessageString(Chat::Yellow, TRADER_BUSY);
MessageString(Chat::Yellow, ClientString::TRADER_BUSY);
return;
}
@ -1839,7 +1839,7 @@ void Client::ShowBuyLines(const EQApplicationPacket *app)
greeting = "Welcome!";
}
MessageString(Chat::NPCQuestSay, BUYER_GREETING, buyer->GetName(), greeting.c_str());
MessageString(Chat::NPCQuestSay, ClientString::BUYER_GREETING, buyer->GetName(), greeting.c_str());
const std::string name(GetName());
buyer->SendSellerBrowsing(name);

View File

@ -971,7 +971,7 @@ void Mob::TuneDoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts,
int strike_through = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
if (strike_through && zone->random.Roll(strike_through)) {
MessageString(Chat::StrikeThrough,
STRIKETHROUGH_STRING); // You strike through your opponents defenses!
ClientString::STRIKETHROUGH_STRING); // You strike through your opponents defenses!
hit.damage_done = 1; // set to one, we will check this to continue
}
// I'm pretty sure you can riposte a riposte
@ -1494,7 +1494,7 @@ void Mob::TuneCommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraA
else if (GetClass() == Class::Ranger && GetLevel() > 50) { // no double dmg on headshot
if ((defender->IsNPC() && !defender->IsMoving() && !defender->IsRooted()) || !RuleB(Combat, ArcheryBonusRequiresStationary)) {
hit.damage_done *= 2;
MessageString(Chat::MeleeCrit, BOW_DOUBLE_DAMAGE);
MessageString(Chat::MeleeCrit, ClientString::BOW_DOUBLE_DAMAGE);
}
}
}

View File

@ -245,11 +245,11 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
if (client && client->Connected()) {
if (scm->chan_num == ChatChannel_TellEcho) {
if (scm->queued == 1) // tell was queued
client->Tell_StringID(QUEUED_TELL, scm->to, scm->message);
client->Tell_StringID(ClientString::QUEUED_TELL, scm->to, scm->message);
else if (scm->queued == 2) // tell queue was full
client->Tell_StringID(QUEUE_TELL_FULL, scm->to, scm->message);
client->Tell_StringID(ClientString::QUEUE_TELL_FULL, scm->to, scm->message);
else if (scm->queued == 3) // person was offline
client->MessageString(Chat::EchoTell, TOLD_NOT_ONLINE, scm->to);
client->MessageString(Chat::EchoTell, ClientString::TOLD_NOT_ONLINE, scm->to);
else // normal tell echo "You told Soanso, 'something'"
// tell echo doesn't use language, so it looks normal to you even if nobody can understand your tells
client->ChannelMessageSend(scm->from, scm->to, scm->chan_num, Language::CommonTongue, Language::MaxValue, scm->message);
@ -487,7 +487,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
Client* client = entity_list.GetClientByID(wars->id);
if (client) {
if (pack->size == 64)//no results
client->MessageString(Chat::White, WHOALL_NO_RESULTS);
client->MessageString(Chat::White, ClientString::WHOALL_NO_RESULTS);
else {
auto outapp = new EQApplicationPacket(OP_WhoAllResponse, pack->size);
memcpy(outapp->pBuffer, pack->pBuffer, pack->size);
@ -973,7 +973,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
Client* c = entity_list.GetClientByName(Rezzer);
if (c)
c->MessageString(Chat::SpellWornOff, REZZ_ALREADY_PENDING);
c->MessageString(Chat::SpellWornOff, ClientString::REZZ_ALREADY_PENDING);
break;
}
@ -3674,7 +3674,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
if (strcasecmp(c.second->GetCleanName(), in->send_to) == 0) {
c.second->MessageString(
Chat::Yellow,
PARCEL_DELIVERY_ARRIVED
ClientString::PARCEL_DELIVERY_ARRIVED
);
c.second->SendParcelStatus();
if (c.second->GetEngagedWithParcelMerchant()) {

View File

@ -737,7 +737,7 @@ void Client::ProcessMovePC(uint32 zoneID, uint32 instance_id, float x, float y,
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
break;
case SummonPC:
MessageString(Chat::Yellow, PLAYER_SUMMONED);
MessageString(Chat::Yellow, ClientString::PLAYER_SUMMONED);
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
break;
case Rewind:
@ -1098,7 +1098,7 @@ void Client::Gate(uint8 bind_number) {
}
void NPC::Gate(uint8 bind_number) {
entity_list.MessageCloseString(this, true, RuleI(Range, SpellMessages), Chat::Spells, GATES, GetCleanName());
entity_list.MessageCloseString(this, true, RuleI(Range, SpellMessages), Chat::Spells, ClientString::GATES, GetCleanName());
Mob::Gate(bind_number);
}