mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
[Constants] Convert string_id Defines to ClientString Namespace
This commit is contained in:
+10
-10
@@ -1195,21 +1195,21 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
|
|||||||
if (send_message_and_save) {
|
if (send_message_and_save) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
AA_IMPROVE,
|
ClientString::AA_IMPROVE,
|
||||||
std::to_string(rank->title_sid).c_str(),
|
std::to_string(rank->title_sid).c_str(),
|
||||||
std::to_string(rank->prev->current_value).c_str(),
|
std::to_string(rank->prev->current_value).c_str(),
|
||||||
std::to_string(cost).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 {
|
} else {
|
||||||
if (send_message_and_save) {
|
if (send_message_and_save) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
AA_GAIN_ABILITY,
|
ClientString::AA_GAIN_ABILITY,
|
||||||
std::to_string(rank->title_sid).c_str(),
|
std::to_string(rank->title_sid).c_str(),
|
||||||
std::to_string(cost).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();
|
CommonBreakInvisible();
|
||||||
|
|
||||||
if (spells[rank->spell].sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
|
if (spells[rank->spell].sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
|
||||||
MessageString(Chat::SpellFailure, SNEAK_RESTRICT);
|
MessageString(Chat::SpellFailure, ClientString::SNEAK_RESTRICT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@@ -1327,7 +1327,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
|
|||||||
SetAppearance(eaStanding, false);
|
SetAppearance(eaStanding, false);
|
||||||
|
|
||||||
if (GetAppearance() != eaStanding) {
|
if (GetAppearance() != eaStanding) {
|
||||||
MessageString(Chat::SpellFailure, STAND_TO_CAST);
|
MessageString(Chat::SpellFailure, ClientString::STAND_TO_CAST);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2125,20 +2125,20 @@ void Client::AutoGrantAAPoints() {
|
|||||||
if (rank->prev) {
|
if (rank->prev) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
AA_IMPROVE,
|
ClientString::AA_IMPROVE,
|
||||||
std::to_string(rank->title_sid).c_str(),
|
std::to_string(rank->title_sid).c_str(),
|
||||||
std::to_string(rank->prev->current_value).c_str(),
|
std::to_string(rank->prev->current_value).c_str(),
|
||||||
"0",
|
"0",
|
||||||
std::to_string(AA_POINTS).c_str()
|
std::to_string(ClientString::AA_POINTS).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
AA_GAIN_ABILITY,
|
ClientString::AA_GAIN_ABILITY,
|
||||||
std::to_string(rank->title_sid).c_str(),
|
std::to_string(rank->title_sid).c_str(),
|
||||||
"0",
|
"0",
|
||||||
std::to_string(AA_POINTS).c_str()
|
std::to_string(ClientString::AA_POINTS).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+41
-41
@@ -1503,7 +1503,7 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts, boo
|
|||||||
this, /* Sender */
|
this, /* Sender */
|
||||||
Chat::StrikeThrough, /* Type: 339 */
|
Chat::StrikeThrough, /* Type: 339 */
|
||||||
FilterStrikethrough, /* FilterType: 12 */
|
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
|
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,
|
this,
|
||||||
Chat::Stun,
|
Chat::Stun,
|
||||||
FilterStuns,
|
FilterStuns,
|
||||||
AVOID_STUNNING_BLOW
|
ClientString::AVOID_STUNNING_BLOW
|
||||||
);
|
);
|
||||||
} else if (zone->random.Roll(stun_resist)) {
|
} else if (zone->random.Roll(stun_resist)) {
|
||||||
other->FilteredMessageString(
|
other->FilteredMessageString(
|
||||||
this,
|
this,
|
||||||
Chat::Stun,
|
Chat::Stun,
|
||||||
FilterStuns,
|
FilterStuns,
|
||||||
SHAKE_OFF_STUN
|
ClientString::SHAKE_OFF_STUN
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
other->Stun(3000); // yuck -- 3 seconds
|
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
|
if (DivineAura() && !CastToClient()->GetGM()) { //cant attack while invulnerable unless your a gm
|
||||||
LogCombat("Attack cancelled, Divine Aura is in effect");
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1856,7 +1856,7 @@ bool Client::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::Skil
|
|||||||
false, /* Skip Sender */
|
false, /* Skip Sender */
|
||||||
RuleI(Range, DamageMessages),
|
RuleI(Range, DamageMessages),
|
||||||
Chat::NonMelee, /* 283 */
|
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 */
|
killer_mob->GetCleanName(), /* Message1 */
|
||||||
GetCleanName(), /* Message2 */
|
GetCleanName(), /* Message2 */
|
||||||
ConvertArray(damage, val1)/* Message3 */
|
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
|
//Check that we can attack before we calc heading and face our target
|
||||||
if (!IsAttackAllowed(other)) {
|
if (!IsAttackAllowed(other)) {
|
||||||
if (GetOwnerID()) {
|
if (GetOwnerID()) {
|
||||||
SayString(NOT_LEGAL_TARGET);
|
SayString(ClientString::NOT_LEGAL_TARGET);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (other->IsClient()) {
|
if (other->IsClient()) {
|
||||||
@@ -2464,7 +2464,7 @@ void NPC::Damage(Mob* other, int64 damage, uint16 spell_id, EQ::skills::SkillTyp
|
|||||||
{
|
{
|
||||||
if (IsLDoNTrapped())
|
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);
|
SpellFinished(GetLDoNTrapSpellID(), other, EQ::spells::CastingSlot::Item, 0, -1, spells[GetLDoNTrapSpellID()].resist_difficulty, false);
|
||||||
SetLDoNTrapSpellID(0);
|
SetLDoNTrapSpellID(0);
|
||||||
SetLDoNTrapped(false);
|
SetLDoNTrapped(false);
|
||||||
@@ -2532,7 +2532,7 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
|||||||
false, /* Skip Sender */
|
false, /* Skip Sender */
|
||||||
RuleI(Range, DamageMessages),
|
RuleI(Range, DamageMessages),
|
||||||
Chat::NonMelee, /* 283 */
|
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 */
|
killer_mob->GetCleanName(), /* Message1 */
|
||||||
GetCleanName(), /* Message2 */
|
GetCleanName(), /* Message2 */
|
||||||
ConvertArray(damage, val1) /* Message3 */
|
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->AddToHateList(attacker, 1, 0, true, false, false, spell_id);
|
||||||
pet->SetTarget(attacker);
|
pet->SetTarget(attacker);
|
||||||
MessageString(Chat::NPCQuestSay, PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
|
MessageString(Chat::NPCQuestSay, ClientString::PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetTempPetCount()) {
|
if (GetTempPetCount()) {
|
||||||
@@ -4310,7 +4310,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
|||||||
true, /* Skip Sender */
|
true, /* Skip Sender */
|
||||||
RuleI(Range, SpellMessages),
|
RuleI(Range, SpellMessages),
|
||||||
Chat::SpellWornOff, /* 284 */
|
Chat::SpellWornOff, /* 284 */
|
||||||
HAS_BEEN_AWAKENED, // %1 has been awakened by %2.
|
ClientString::HAS_BEEN_AWAKENED, // %1 has been awakened by %2.
|
||||||
GetCleanName(), /* Message1 */
|
GetCleanName(), /* Message1 */
|
||||||
attacker->GetCleanName() /* Message2 */
|
attacker->GetCleanName() /* Message2 */
|
||||||
);
|
);
|
||||||
@@ -4442,7 +4442,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
|||||||
this,
|
this,
|
||||||
Chat::Stun,
|
Chat::Stun,
|
||||||
FilterStuns,
|
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,
|
this,
|
||||||
Chat::Stun,
|
Chat::Stun,
|
||||||
FilterStuns,
|
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) {
|
if (FromDamageShield && damage > 0) {
|
||||||
//special crap for spell damage, looks hackish to me
|
//special crap for spell damage, looks hackish to me
|
||||||
char val1[20] = { 0 };
|
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 {
|
else {
|
||||||
if (damage > 0) {
|
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) {
|
if (owner && owner->CastToClient()->GetFilter(FilterDamageShields) != FilterHide) {
|
||||||
owner->MessageString(
|
owner->MessageString(
|
||||||
Chat::DamageShield,
|
Chat::DamageShield,
|
||||||
OTHER_HIT_NONMELEE,
|
ClientString::OTHER_HIT_NONMELEE,
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
ConvertArray(damage, val1)
|
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) {
|
if (attacker->CastToClient()->GetFilter(FilterDamageShields) != FilterHide) {
|
||||||
attacker->MessageString(
|
attacker->MessageString(
|
||||||
Chat::DamageShield,
|
Chat::DamageShield,
|
||||||
OTHER_HIT_NONMELEE,
|
ClientString::OTHER_HIT_NONMELEE,
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
ConvertArray(damage, val1)
|
ConvertArray(damage, val1)
|
||||||
);
|
);
|
||||||
@@ -4636,7 +4636,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
|||||||
RuleI(Range, SpellMessages),
|
RuleI(Range, SpellMessages),
|
||||||
Chat::NonMelee, /* 283 */
|
Chat::NonMelee, /* 283 */
|
||||||
FilterSpellDamage, /* FilterType: 13 */
|
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,
|
0,
|
||||||
attacker->GetCleanName(), /* Message1 */
|
attacker->GetCleanName(), /* Message1 */
|
||||||
GetCleanName(), /* Message2 */
|
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
|
//might filter on (attack_skill>200 && attack_skill<250), but I dont think we need it
|
||||||
if (!attacker->IsCorpse() && attacker->IsClient()) {
|
if (!attacker->IsCorpse() && attacker->IsClient()) {
|
||||||
attacker->FilteredMessageString(attacker, Chat::DotDamage,
|
attacker->FilteredMessageString(attacker, Chat::DotDamage,
|
||||||
FilterDOT, YOUR_HIT_DOT, GetCleanName(), itoa(damage),
|
FilterDOT, ClientString::YOUR_HIT_DOT, GetCleanName(), itoa(damage),
|
||||||
spells[spell_id].name);
|
spells[spell_id].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
FilteredMessageString(this, Chat::DotDamage, FilterDOT,
|
FilteredMessageString(this, Chat::DotDamage, FilterDOT,
|
||||||
YOU_TAKE_DOT, itoa(damage), attacker->GetCleanName(),
|
ClientString::YOU_TAKE_DOT, itoa(damage), attacker->GetCleanName(),
|
||||||
spells[spell_id].name);
|
spells[spell_id].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4775,7 +4775,7 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
|||||||
RuleI(Range, SpellMessages),
|
RuleI(Range, SpellMessages),
|
||||||
Chat::DotDamage, /* Type: 325 */
|
Chat::DotDamage, /* Type: 325 */
|
||||||
FilterDOT, /* FilterType: 19 */
|
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 */
|
attacker, /* sent above */
|
||||||
GetCleanName(), /* Message1 */
|
GetCleanName(), /* Message1 */
|
||||||
itoa(damage), /* Message2 */
|
itoa(damage), /* Message2 */
|
||||||
@@ -4813,45 +4813,45 @@ void Mob::HealDamage(uint64 amount, Mob* caster, uint16 spell_id)
|
|||||||
if ((caster->IsClient() && caster == this)) {
|
if ((caster->IsClient() && caster == this)) {
|
||||||
if (caster->CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater) {
|
if (caster->CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater) {
|
||||||
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
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
|
else
|
||||||
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
||||||
YOU_HEALED, GetCleanName(), itoa(acthealed));
|
ClientString::YOU_HEALED, GetCleanName(), itoa(acthealed));
|
||||||
}
|
}
|
||||||
else if ((caster->IsClient() && caster != this)) {
|
else if ((caster->IsClient() && caster != this)) {
|
||||||
if (caster->CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater)
|
if (caster->CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater)
|
||||||
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
||||||
HOT_HEAL_OTHER, GetCleanName(), itoa(acthealed),
|
ClientString::HOT_HEAL_OTHER, GetCleanName(), itoa(acthealed),
|
||||||
spells[spell_id].name);
|
spells[spell_id].name);
|
||||||
else
|
else
|
||||||
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
||||||
YOU_HEAL, GetCleanName(), itoa(acthealed));
|
ClientString::YOU_HEAL, GetCleanName(), itoa(acthealed));
|
||||||
}
|
}
|
||||||
|
|
||||||
// message to target
|
// message to target
|
||||||
if (IsClient() && caster != this) {
|
if (IsClient() && caster != this) {
|
||||||
if (CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater)
|
if (CastToClient()->ClientVersionBit() & EQ::versions::maskSoFAndLater)
|
||||||
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
||||||
HOT_HEALED_OTHER, caster->GetCleanName(),
|
ClientString::HOT_HEALED_OTHER, caster->GetCleanName(),
|
||||||
itoa(acthealed), spells[spell_id].name);
|
itoa(acthealed), spells[spell_id].name);
|
||||||
else
|
else
|
||||||
FilteredMessageString(this, Chat::NonMelee, FilterHealOverTime,
|
FilteredMessageString(this, Chat::NonMelee, FilterHealOverTime,
|
||||||
YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
|
ClientString::YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // normal heals
|
else { // normal heals
|
||||||
// Message to caster
|
// Message to caster
|
||||||
if (caster->IsClient()) {
|
if (caster->IsClient()) {
|
||||||
caster->FilteredMessageString(caster, Chat::NonMelee,
|
caster->FilteredMessageString(caster, Chat::NonMelee,
|
||||||
FilterSpellDamage, YOU_HEAL, GetCleanName(),
|
FilterSpellDamage, ClientString::YOU_HEAL, GetCleanName(),
|
||||||
itoa(acthealed));
|
itoa(acthealed));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Message to target
|
// Message to target
|
||||||
if (IsClient() && caster != this) {
|
if (IsClient() && caster != this) {
|
||||||
FilteredMessageString(caster, Chat::NonMelee,
|
FilteredMessageString(caster, Chat::NonMelee,
|
||||||
FilterSpellDamage, YOU_HEALED, caster->GetCleanName(),
|
FilterSpellDamage, ClientString::YOU_HEALED, caster->GetCleanName(),
|
||||||
itoa(acthealed));
|
itoa(acthealed));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5067,10 +5067,10 @@ void Mob::TryWeaponProc(const EQ::ItemInstance *inst, const EQ::ItemData *weapon
|
|||||||
if (IsPet()) {
|
if (IsPet()) {
|
||||||
Mob *own = GetOwner();
|
Mob *own = GetOwner();
|
||||||
if (own)
|
if (own)
|
||||||
own->MessageString(Chat::Red, PROC_PETTOOLOW);
|
own->MessageString(Chat::Red, ClientString::PROC_PETTOOLOW);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MessageString(Chat::Red, PROC_TOOLOW);
|
MessageString(Chat::Red, ClientString::PROC_TOOLOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -5102,10 +5102,10 @@ void Mob::TryWeaponProc(const EQ::ItemInstance *inst, const EQ::ItemData *weapon
|
|||||||
if (IsPet()) {
|
if (IsPet()) {
|
||||||
Mob *own = GetOwner();
|
Mob *own = GetOwner();
|
||||||
if (own)
|
if (own)
|
||||||
own->MessageString(Chat::Red, PROC_PETTOOLOW);
|
own->MessageString(Chat::Red, ClientString::PROC_PETTOOLOW);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MessageString(Chat::Red, PROC_TOOLOW);
|
MessageString(Chat::Red, ClientString::PROC_TOOLOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -5344,7 +5344,7 @@ void Mob::TryPetCriticalHit(Mob *defender, DamageHitInfo &hit)
|
|||||||
RuleI(Range, CriticalDamage),
|
RuleI(Range, CriticalDamage),
|
||||||
Chat::MeleeCrit, /* Type: 301 */
|
Chat::MeleeCrit, /* Type: 301 */
|
||||||
FilterMeleeCrits, /* FilterType: 12 */
|
FilterMeleeCrits, /* FilterType: 12 */
|
||||||
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
|
ClientString::CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
|
||||||
0,
|
0,
|
||||||
GetCleanName(), /* Message1 */
|
GetCleanName(), /* Message1 */
|
||||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
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);
|
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(
|
entity_list.FilteredMessageCloseString(
|
||||||
this, /* Sender */
|
this, /* Sender */
|
||||||
@@ -5514,7 +5514,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
|||||||
RuleI(Range, CriticalDamage),
|
RuleI(Range, CriticalDamage),
|
||||||
Chat::MeleeCrit, /* Type: 301 */
|
Chat::MeleeCrit, /* Type: 301 */
|
||||||
FilterMeleeCrits, /* FilterType: 12 */
|
FilterMeleeCrits, /* FilterType: 12 */
|
||||||
DEADLY_STRIKE, /* MessageFormat: %1 scores a Deadly Strike!(%2) */
|
ClientString::DEADLY_STRIKE, /* MessageFormat: %1 scores a Deadly Strike!(%2) */
|
||||||
0,
|
0,
|
||||||
GetCleanName(), /* Message1 */
|
GetCleanName(), /* Message1 */
|
||||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||||
@@ -5543,7 +5543,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
|||||||
RuleI(Range, CriticalDamage),
|
RuleI(Range, CriticalDamage),
|
||||||
Chat::MeleeCrit, /* Type: 301 */
|
Chat::MeleeCrit, /* Type: 301 */
|
||||||
FilterMeleeCrits, /* FilterType: 12 */
|
FilterMeleeCrits, /* FilterType: 12 */
|
||||||
CRIPPLING_BLOW, /* MessageFormat: %1 lands a Crippling Blow!(%2) */
|
ClientString::CRIPPLING_BLOW, /* MessageFormat: %1 lands a Crippling Blow!(%2) */
|
||||||
0,
|
0,
|
||||||
GetCleanName(), /* Message1 */
|
GetCleanName(), /* Message1 */
|
||||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||||
@@ -5558,7 +5558,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
|||||||
true,
|
true,
|
||||||
RuleI(Range, Emote),
|
RuleI(Range, Emote),
|
||||||
Chat::Emote,
|
Chat::Emote,
|
||||||
STAGGERS,
|
ClientString::STAGGERS,
|
||||||
GetName()
|
GetName()
|
||||||
);
|
);
|
||||||
defender->Stun(RuleI(Combat, StunDuration));
|
defender->Stun(RuleI(Combat, StunDuration));
|
||||||
@@ -5573,7 +5573,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
|||||||
RuleI(Range, CriticalDamage),
|
RuleI(Range, CriticalDamage),
|
||||||
Chat::MeleeCrit, /* Type: 301 */
|
Chat::MeleeCrit, /* Type: 301 */
|
||||||
FilterMeleeCrits, /* FilterType: 12 */
|
FilterMeleeCrits, /* FilterType: 12 */
|
||||||
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
|
ClientString::CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
|
||||||
0,
|
0,
|
||||||
GetCleanName(), /* Message1 */
|
GetCleanName(), /* Message1 */
|
||||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||||
@@ -5633,7 +5633,7 @@ bool Mob::TryFinishingBlow(Mob *defender, int64 &damage)
|
|||||||
RuleI(Range, CriticalDamage),
|
RuleI(Range, CriticalDamage),
|
||||||
Chat::MeleeCrit, /* Type: 301 */
|
Chat::MeleeCrit, /* Type: 301 */
|
||||||
FilterMeleeCrits, /* FilterType: 12 */
|
FilterMeleeCrits, /* FilterType: 12 */
|
||||||
FINISHING_BLOW, /* MessageFormat: %1 scores a Finishing Blow!!) */
|
ClientString::FINISHING_BLOW, /* MessageFormat: %1 scores a Finishing Blow!!) */
|
||||||
0,
|
0,
|
||||||
GetCleanName() /* Message1 */
|
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
|
// so ahhh the angle you can riposte is larger than the angle you can hit :P
|
||||||
if (!defender->IsFacingMob(this)) {
|
if (!defender->IsFacingMob(this)) {
|
||||||
defender->MessageString(Chat::TooFarAway, CANT_SEE_TARGET);
|
defender->MessageString(Chat::TooFarAway, ClientString::CANT_SEE_TARGET);
|
||||||
return;
|
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
|
else if (GetClass() == Class::Ranger && GetLevel() >= RuleI(Combat, ArcheryBonusLevelRequirement)) { // no double dmg on headshot
|
||||||
if ((defender->IsNPC() && !defender->IsMoving() && !defender->IsRooted()) || !RuleB(Combat, ArcheryBonusRequiresStationary)) {
|
if ((defender->IsNPC() && !defender->IsMoving() && !defender->IsRooted()) || !RuleB(Combat, ArcheryBonusRequiresStationary)) {
|
||||||
hit.damage_done *= 2;
|
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)) {
|
if (zone->random.Roll(flurry_chance)) {
|
||||||
Attack(target, hand, false, false, IsFromSpell);
|
Attack(target, hand, false, false, IsFromSpell);
|
||||||
}
|
}
|
||||||
MessageString(Chat::NPCFlurry, YOU_FLURRY);
|
MessageString(Chat::NPCFlurry, ClientString::YOU_FLURRY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1027,11 +1027,11 @@ void Mob::AddTrap(Aura *aura, AuraRecord &record)
|
|||||||
bool Mob::CanSpawnAura(bool trap)
|
bool Mob::CanSpawnAura(bool trap)
|
||||||
{
|
{
|
||||||
if (trap && !HasFreeTrapSlots()) {
|
if (trap && !HasFreeTrapSlots()) {
|
||||||
MessageString(Chat::SpellFailure, NO_MORE_TRAPS);
|
MessageString(Chat::SpellFailure, ClientString::NO_MORE_TRAPS);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!trap && !HasFreeAuraSlots()) {
|
else if (!trap && !HasFreeAuraSlots()) {
|
||||||
MessageString(Chat::SpellFailure, NO_MORE_AURAS);
|
MessageString(Chat::SpellFailure, ClientString::NO_MORE_AURAS);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-13
@@ -2932,7 +2932,7 @@ void Bot::DoAttackRounds(Mob* target, int hand) {
|
|||||||
if (GetOwner()) {
|
if (GetOwner()) {
|
||||||
GetOwner()->MessageString(
|
GetOwner()->MessageString(
|
||||||
Chat::NPCFlurry,
|
Chat::NPCFlurry,
|
||||||
NPC_FLURRY,
|
ClientString::NPC_FLURRY,
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
target->GetCleanName()
|
target->GetCleanName()
|
||||||
);
|
);
|
||||||
@@ -3454,11 +3454,11 @@ bool Bot::CheckIfIncapacitated() {
|
|||||||
void Bot::SetBerserkState() {// Berserk updates should occur if primary AI criteria are met
|
void Bot::SetBerserkState() {// Berserk updates should occur if primary AI criteria are met
|
||||||
if (GetClass() == Class::Warrior || GetClass() == Class::Berserker) {
|
if (GetClass() == Class::Warrior || GetClass() == Class::Berserker) {
|
||||||
if (!berserk && GetHPRatio() < RuleI(Combat, BerserkerFrenzyStart)) {
|
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;
|
berserk = true;
|
||||||
}
|
}
|
||||||
if (berserk && GetHPRatio() > RuleI(Combat, BerserkerFrenzyEnd)) {
|
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;
|
berserk = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5101,7 +5101,7 @@ bool Bot::TryFinishingBlow(Mob *defender, int64 &damage)
|
|||||||
if (defender->GetLevel() <= levelreq && (chance >= zone->random.Int(1, 1000))) {
|
if (defender->GetLevel() <= levelreq && (chance >= zone->random.Int(1, 1000))) {
|
||||||
LogCombat("Landed a finishing blow: levelreq at [{}] other level [{}]",
|
LogCombat("Landed a finishing blow: levelreq at [{}] other level [{}]",
|
||||||
levelreq, defender->GetLevel());
|
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;
|
damage = fb_damage;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@@ -5362,7 +5362,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
|
|||||||
if (bo && bo->IsClient() && bo->CastToClient()->GetBotOption(Client::booMonkWuMessage)) {
|
if (bo && bo->IsClient() && bo->CastToClient()->GetBotOption(Client::booMonkWuMessage)) {
|
||||||
|
|
||||||
bo->Message(
|
bo->Message(
|
||||||
GENERIC_EMOTE,
|
ClientString::GENERIC_EMOTE,
|
||||||
"The spirit of Master Wu fills %s! %s gains %d additional attack(s).",
|
"The spirit of Master Wu fills %s! %s gains %d additional attack(s).",
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
@@ -5563,7 +5563,7 @@ void Bot::DoClassAttacks(Mob *target, bool IsRiposte) {
|
|||||||
if (bo && bo->IsClient() && bo->CastToClient()->GetBotOption(Client::booMonkWuMessage)) {
|
if (bo && bo->IsClient() && bo->CastToClient()->GetBotOption(Client::booMonkWuMessage)) {
|
||||||
|
|
||||||
bo->Message(
|
bo->Message(
|
||||||
GENERIC_EMOTE,
|
ClientString::GENERIC_EMOTE,
|
||||||
"The spirit of Master Wu fills %s! %s gains %d additional attack(s).",
|
"The spirit of Master Wu fills %s! %s gains %d additional attack(s).",
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
@@ -5920,12 +5920,12 @@ bool Bot::CastSpell(
|
|||||||
|
|
||||||
if (DivineAura()) {
|
if (DivineAura()) {
|
||||||
LogSpellsDetail("Spell casting canceled: cannot cast while Divine Aura is in effect");
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slot < EQ::spells::CastingSlot::MaxGems && !CheckFizzle(spell_id)) {
|
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);
|
InterruptSpell(fizzle_msg, 0x121, spell_id);
|
||||||
|
|
||||||
uint32 use_mana = ((spells[spell_id].mana) / 4);
|
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()) {
|
} 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) {
|
if (r) {
|
||||||
for (const auto& m : r->members) {
|
for (const auto& m : r->members) {
|
||||||
if (m.member && m.member->IsClient()) {
|
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()) {
|
else if (HasGroup()) {
|
||||||
for (auto& m : GetGroup()->members) {
|
for (auto& m : GetGroup()->members) {
|
||||||
if (m && m->IsClient()) {
|
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()) {
|
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)) {
|
if (IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false)) {
|
||||||
LogSpells("Clients cannot fear eachother!");
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
else if (GetLevel() > spells[spell_id].max_value[effect_index] && spells[spell_id].max_value[effect_index] != 0) {
|
else if (GetLevel() > spells[spell_id].max_value[effect_index] && spells[spell_id].max_value[effect_index] != 0) {
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ void bot_command_inventory_remove(Client* c, const Seperator* sep)
|
|||||||
int ab_mask = (ActionableBots::ABM_Target | ActionableBots::ABM_ByName);
|
int ab_mask = (ActionableBots::ABM_Target | ActionableBots::ABM_ByName);
|
||||||
|
|
||||||
if (c->GetTradeskillObject() || (c->trade->state == Trading)) {
|
if (c->GetTradeskillObject() || (c->trade->state == Trading)) {
|
||||||
c->MessageString(Chat::Tell, MERCHANT_BUSY);
|
c->MessageString(Chat::Tell, ClientString::MERCHANT_BUSY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ void bot_command_pet_get_lost(Client *c, const Seperator *sep)
|
|||||||
if (!bot_iter->GetPet() || bot_iter->GetPet()->IsCharmed())
|
if (!bot_iter->GetPet() || bot_iter->GetPet()->IsCharmed())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bot_iter->GetPet()->SayString(PET_GETLOST_STRING);
|
bot_iter->GetPet()->SayString(ClientString::PET_GETLOST_STRING);
|
||||||
bot_iter->GetPet()->Depop(false);
|
bot_iter->GetPet()->Depop(false);
|
||||||
bot_iter->SetPetID(0);
|
bot_iter->SetPetID(0);
|
||||||
database.botdb.DeletePetItems(bot_iter->GetBotID());
|
database.botdb.DeletePetItems(bot_iter->GetBotID());
|
||||||
@@ -80,7 +80,7 @@ void bot_command_pet_remove(Client *c, const Seperator *sep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bot_iter->GetPet()) {
|
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->GetPet()->Depop(false);
|
||||||
bot_iter->SetPetID(0);
|
bot_iter->SetPetID(0);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -154,7 +154,7 @@ void Bot::ProcessRaidInvite(Mob* invitee, Client* invitor, bool group_invite) {
|
|||||||
Raid* raid = entity_list.GetRaidByClient(invitor);
|
Raid* raid = entity_list.GetRaidByClient(invitor);
|
||||||
|
|
||||||
if (raid && raid->RaidCount() >= MAX_RAID_MEMBERS) {
|
if (raid && raid->RaidCount() >= MAX_RAID_MEMBERS) {
|
||||||
invitor->MessageString(Chat::Red, RAID_IS_FULL);
|
invitor->MessageString(Chat::Red, ClientString::RAID_IS_FULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Bot::CreateBotRaid(invitee, invitor, group_invite, raid);
|
Bot::CreateBotRaid(invitee, invitor, group_invite, raid);
|
||||||
|
|||||||
+73
-73
@@ -1361,9 +1361,9 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
|||||||
{
|
{
|
||||||
case ChatChannel_Guild: { /* Guild Chat */
|
case ChatChannel_Guild: { /* Guild Chat */
|
||||||
if (!IsInAGuild()) {
|
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)) {
|
} 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)) {
|
} else if (!worldserver.SendChannelMessage(this, targetname, chan_num, GuildID(), language, lang_skill, message)) {
|
||||||
Message(Chat::White, "Error: World server disconnected");
|
Message(Chat::White, "Error: World server disconnected");
|
||||||
}
|
}
|
||||||
@@ -2090,7 +2090,7 @@ void Client::IncreaseLanguageSkill(uint8 language_id, uint8 increase)
|
|||||||
QueuePacket(outapp);
|
QueuePacket(outapp);
|
||||||
safe_delete(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) {
|
void Client::AddSkill(EQ::skills::SkillType skillid, uint16 value) {
|
||||||
@@ -3323,7 +3323,7 @@ void Client::SetPVP(bool toggle, bool message) {
|
|||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
if(GetPVP()) {
|
if(GetPVP()) {
|
||||||
MessageString(Chat::Shout, PVP_ON);
|
MessageString(Chat::Shout, ClientString::PVP_ON);
|
||||||
} else {
|
} else {
|
||||||
Message(Chat::Shout, "You now follow the ways of Order.");
|
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)
|
if (matslot != EQ::textures::materialInvalid)
|
||||||
SendWearChange(matslot);
|
SendWearChange(matslot);
|
||||||
}
|
}
|
||||||
MessageString(Chat::Skills, DISARMED);
|
MessageString(Chat::Skills, ClientString::DISARMED);
|
||||||
if (disarmer != this)
|
if (disarmer != this)
|
||||||
disarmer->MessageString(Chat::Skills, DISARM_SUCCESS, GetCleanName());
|
disarmer->MessageString(Chat::Skills, ClientString::DISARM_SUCCESS, GetCleanName());
|
||||||
if (chance != 1000)
|
if (chance != 1000)
|
||||||
disarmer->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 4);
|
disarmer->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 4);
|
||||||
CalcBonuses();
|
CalcBonuses();
|
||||||
// CalcEnduranceWeightFactor();
|
// CalcEnduranceWeightFactor();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
disarmer->MessageString(Chat::Skills, DISARM_FAILED);
|
disarmer->MessageString(Chat::Skills, ClientString::DISARM_FAILED);
|
||||||
if (chance != 1000)
|
if (chance != 1000)
|
||||||
disarmer->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 2);
|
disarmer->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
disarmer->MessageString(Chat::Skills, DISARM_FAILED);
|
disarmer->MessageString(Chat::Skills, ClientString::DISARM_FAILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Client::BindWound(Mob *bindmob, bool start, bool fail)
|
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"
|
// send bindmob "stand still"
|
||||||
if (!bindmob->IsAIControlled() && bindmob != this) {
|
if (!bindmob->IsAIControlled() && bindmob != this) {
|
||||||
bindmob->CastToClient()->MessageString(Chat::Yellow,
|
bindmob->CastToClient()->MessageString(Chat::Yellow,
|
||||||
YOU_ARE_BEING_BANDAGED);
|
ClientString::YOU_ARE_BEING_BANDAGED);
|
||||||
} else if (bindmob->IsAIControlled() && bindmob != this) {
|
} else if (bindmob->IsAIControlled() && bindmob != this) {
|
||||||
; // Tell IPC to stand still?
|
; // Tell IPC to stand still?
|
||||||
} else {
|
} else {
|
||||||
@@ -4010,7 +4010,7 @@ void Client::Tell_StringID(uint32 string_id, const char *who, const char *messag
|
|||||||
char string_id_str[10];
|
char string_id_str[10];
|
||||||
snprintf(string_id_str, 10, "%d", string_id);
|
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) {
|
void Client::SetTint(int16 in_slot, uint32 color) {
|
||||||
@@ -4080,7 +4080,7 @@ void Client::SetLanguageSkill(uint8 language_id, uint8 language_skill)
|
|||||||
QueuePacket(outapp);
|
QueuePacket(outapp);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
|
|
||||||
MessageString(Chat::Skills, LANG_SKILL_IMPROVED);
|
MessageString(Chat::Skills, ClientString::LANG_SKILL_IMPROVED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::LinkDead()
|
void Client::LinkDead()
|
||||||
@@ -4170,7 +4170,7 @@ void Client::Escape()
|
|||||||
{
|
{
|
||||||
entity_list.RemoveFromTargets(this, true);
|
entity_list.RemoveFromTargets(this, true);
|
||||||
SetInvisible(Invisibility::Invisible);
|
SetInvisible(Invisibility::Invisible);
|
||||||
MessageString(Chat::Skills, ESCAPE);
|
MessageString(Chat::Skills, ClientString::ESCAPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
float Client::CalcClassicPriceMod(Mob* other, bool reverse) {
|
float Client::CalcClassicPriceMod(Mob* other, bool reverse) {
|
||||||
@@ -4383,13 +4383,13 @@ void Client::SacrificeConfirm(Mob *caster)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (GetLevel() < RuleI(Spells, SacrificeMinLevel)) {
|
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);
|
safe_delete(outapp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetLevel() > RuleI(Spells, SacrificeMaxLevel)) {
|
if (GetLevel() > RuleI(Spells, SacrificeMaxLevel)) {
|
||||||
caster->MessageString(Chat::Red, SAC_TOO_HIGH);
|
caster->MessageString(Chat::Red, ClientString::SAC_TOO_HIGH);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4461,7 +4461,7 @@ void Client::Sacrifice(Mob *caster)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} 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)
|
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->SpellFinished(target->GetLDoNTrapSpellID(), this, EQ::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].resist_difficulty);
|
||||||
target->SetLDoNTrapSpellID(0);
|
target->SetLDoNTrapSpellID(0);
|
||||||
target->SetLDoNTrapped(false);
|
target->SetLDoNTrapped(false);
|
||||||
@@ -5695,7 +5695,7 @@ void Client::HandleLDoNOpen(NPC *target)
|
|||||||
|
|
||||||
if(target->IsLDoNLocked())
|
if(target->IsLDoNLocked())
|
||||||
{
|
{
|
||||||
MessageString(Chat::Skills, LDON_STILL_LOCKED, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_STILL_LOCKED, target->GetCleanName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -5729,13 +5729,13 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
|
|||||||
{
|
{
|
||||||
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(target->IsLDoNTrapDetected())
|
if(target->IsLDoNTrapDetected())
|
||||||
{
|
{
|
||||||
MessageString(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_CERTAIN_TRAP, target->GetCleanName());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -5744,10 +5744,10 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
|
|||||||
{
|
{
|
||||||
case -1:
|
case -1:
|
||||||
case 0:
|
case 0:
|
||||||
MessageString(Chat::Skills, LDON_DONT_KNOW_TRAPPED, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_DONT_KNOW_TRAPPED, target->GetCleanName());
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
MessageString(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_CERTAIN_TRAP, target->GetCleanName());
|
||||||
target->SetLDoNTrapDetected(true);
|
target->SetLDoNTrapDetected(true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -5757,7 +5757,7 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
|
|||||||
}
|
}
|
||||||
else
|
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())
|
if(!target->IsLDoNTrapped())
|
||||||
{
|
{
|
||||||
MessageString(Chat::Skills, LDON_WAS_NOT_TRAPPED, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_WAS_NOT_TRAPPED, target->GetCleanName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5795,13 +5795,13 @@ void Client::HandleLDoNDisarm(NPC *target, uint16 skill, uint8 type)
|
|||||||
target->SetLDoNTrapDetected(false);
|
target->SetLDoNTrapDetected(false);
|
||||||
target->SetLDoNTrapped(false);
|
target->SetLDoNTrapped(false);
|
||||||
target->SetLDoNTrapSpellID(0);
|
target->SetLDoNTrapSpellID(0);
|
||||||
MessageString(Chat::Skills, LDON_HAVE_DISARMED, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_HAVE_DISARMED, target->GetCleanName());
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
MessageString(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_HAVE_NOT_DISARMED, target->GetCleanName());
|
||||||
break;
|
break;
|
||||||
case -1:
|
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->SpellFinished(target->GetLDoNTrapSpellID(), this, EQ::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].resist_difficulty);
|
||||||
target->SetLDoNTrapSpellID(0);
|
target->SetLDoNTrapSpellID(0);
|
||||||
target->SetLDoNTrapped(false);
|
target->SetLDoNTrapped(false);
|
||||||
@@ -5820,7 +5820,7 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
|
|||||||
{
|
{
|
||||||
if(target->IsLDoNTrapped())
|
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->SpellFinished(target->GetLDoNTrapSpellID(), this, EQ::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].resist_difficulty);
|
||||||
target->SetLDoNTrapSpellID(0);
|
target->SetLDoNTrapSpellID(0);
|
||||||
target->SetLDoNTrapped(false);
|
target->SetLDoNTrapped(false);
|
||||||
@@ -5829,7 +5829,7 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
|
|||||||
|
|
||||||
if(!target->IsLDoNLocked())
|
if(!target->IsLDoNLocked())
|
||||||
{
|
{
|
||||||
MessageString(Chat::Skills, LDON_WAS_NOT_LOCKED, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_WAS_NOT_LOCKED, target->GetCleanName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5845,11 +5845,11 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
case -1:
|
case -1:
|
||||||
MessageString(Chat::Skills, LDON_PICKLOCK_FAILURE, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_PICKLOCK_FAILURE, target->GetCleanName());
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
target->SetLDoNLocked(false);
|
target->SetLDoNLocked(false);
|
||||||
MessageString(Chat::Skills, LDON_PICKLOCK_SUCCESS, target->GetCleanName());
|
MessageString(Chat::Skills, ClientString::LDON_PICKLOCK_SUCCESS, target->GetCleanName());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6409,7 +6409,7 @@ void Client::SuspendMinion(int value)
|
|||||||
|
|
||||||
CurrentPet->SetTaunting(m_suspendedminion.taunting);
|
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));
|
memset(&m_suspendedminion, 0, sizeof(struct PetInfo));
|
||||||
// TODO: These pet command states need to be synced ...
|
// TODO: These pet command states need to be synced ...
|
||||||
@@ -6440,19 +6440,19 @@ void Client::SuspendMinion(int value)
|
|||||||
{
|
{
|
||||||
if(m_suspendedminion.SpellID > 0)
|
if(m_suspendedminion.SpellID > 0)
|
||||||
{
|
{
|
||||||
MessageString(Chat::Red,ONLY_ONE_PET);
|
MessageString(Chat::Red, ClientString::ONLY_ONE_PET);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(CurrentPet->IsEngaged())
|
else if(CurrentPet->IsEngaged())
|
||||||
{
|
{
|
||||||
MessageString(Chat::Red,SUSPEND_MINION_FIGHTING);
|
MessageString(Chat::Red, ClientString::SUSPEND_MINION_FIGHTING);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if(entity_list.Fighting(CurrentPet))
|
else if(entity_list.Fighting(CurrentPet))
|
||||||
{
|
{
|
||||||
MessageString(Chat::Blue,SUSPEND_MINION_HAS_AGGRO);
|
MessageString(Chat::Blue, ClientString::SUSPEND_MINION_HAS_AGGRO);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -6469,7 +6469,7 @@ void Client::SuspendMinion(int value)
|
|||||||
else
|
else
|
||||||
strn0cpy(m_suspendedminion.Name, CurrentPet->GetName(), 64); // Name stays even at rank 1
|
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);
|
CurrentPet->Depop(false);
|
||||||
|
|
||||||
@@ -6478,7 +6478,7 @@ void Client::SuspendMinion(int value)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageString(Chat::Red, ONLY_SUMMONED_PETS);
|
MessageString(Chat::Red, ClientString::ONLY_SUMMONED_PETS);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -6504,7 +6504,7 @@ void Client::AddEbonCrystals(uint32 amount, bool is_reclaim) {
|
|||||||
|
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
YOU_RECEIVE,
|
ClientString::YOU_RECEIVE,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} {}",
|
"{} {}",
|
||||||
amount,
|
amount,
|
||||||
@@ -6531,7 +6531,7 @@ void Client::AddRadiantCrystals(uint32 amount, bool is_reclaim) {
|
|||||||
|
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
YOU_RECEIVE,
|
ClientString::YOU_RECEIVE,
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} {}",
|
"{} {}",
|
||||||
amount,
|
amount,
|
||||||
@@ -7034,16 +7034,16 @@ void Client::LocateCorpse()
|
|||||||
|
|
||||||
if(ClosestCorpse)
|
if(ClosestCorpse)
|
||||||
{
|
{
|
||||||
MessageString(Chat::Spells, SENSE_CORPSE_DIRECTION);
|
MessageString(Chat::Spells, ClientString::SENSE_CORPSE_DIRECTION);
|
||||||
SetHeading(CalculateHeadingToTarget(ClosestCorpse->GetX(), ClosestCorpse->GetY()));
|
SetHeading(CalculateHeadingToTarget(ClosestCorpse->GetX(), ClosestCorpse->GetY()));
|
||||||
SetTarget(ClosestCorpse);
|
SetTarget(ClosestCorpse);
|
||||||
SendTargetCommand(ClosestCorpse->GetID());
|
SendTargetCommand(ClosestCorpse->GetID());
|
||||||
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
|
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
|
||||||
}
|
}
|
||||||
else if(!GetTarget())
|
else if(!GetTarget())
|
||||||
MessageString(Chat::Red, SENSE_CORPSE_NONE);
|
MessageString(Chat::Red, ClientString::SENSE_CORPSE_NONE);
|
||||||
else
|
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)
|
void Client::NPCSpawn(NPC *target_npc, const char *identifier, uint32 extra)
|
||||||
@@ -7121,7 +7121,7 @@ void Client::DragCorpses()
|
|||||||
if (!corpse || !corpse->IsPlayerCorpse() ||
|
if (!corpse || !corpse->IsPlayerCorpse() ||
|
||||||
corpse->CastToCorpse()->IsBeingLooted() ||
|
corpse->CastToCorpse()->IsBeingLooted() ||
|
||||||
!corpse->CastToCorpse()->Summon(this, false, false)) {
|
!corpse->CastToCorpse()->Summon(this, false, false)) {
|
||||||
MessageString(Chat::DefaultText, CORPSEDRAG_STOP);
|
MessageString(Chat::DefaultText, ClientString::CORPSEDRAG_STOP);
|
||||||
It = DraggedCorpses.erase(It);
|
It = DraggedCorpses.erase(It);
|
||||||
if (It == DraggedCorpses.end())
|
if (It == DraggedCorpses.end())
|
||||||
break;
|
break;
|
||||||
@@ -7132,10 +7132,10 @@ void Client::DragCorpses()
|
|||||||
void Client::ConsentCorpses(std::string consent_name, bool deny)
|
void Client::ConsentCorpses(std::string consent_name, bool deny)
|
||||||
{
|
{
|
||||||
if (strcasecmp(consent_name.c_str(), GetName()) == 0) {
|
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()) {
|
else if (!consent_throttle_timer.Check()) {
|
||||||
MessageString(Chat::Red, CONSENT_WAIT);
|
MessageString(Chat::Red, ClientString::CONSENT_WAIT);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
auto pack = new ServerPacket(ServerOP_Consent, sizeof(ServerOP_Consent_Struct));
|
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))
|
if (!(m_ClientVersionBit & EQ::versions::maskRoFAndLater))
|
||||||
{
|
{
|
||||||
MessageString(Chat::White, PICK_LORE);
|
MessageString(Chat::White, ClientString::PICK_LORE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8085,7 +8085,7 @@ void Client::DuplicateLoreMessage(uint32 ItemID)
|
|||||||
if(!item)
|
if(!item)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MessageString(Chat::White, PICK_LORE, item->Name);
|
MessageString(Chat::White, ClientString::PICK_LORE, item->Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::GarbleMessage(char *message, uint8 variance)
|
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 no primary faction or biggest influence is your faction hit
|
||||||
if (primaryfaction <= 0 || lowestvalue == tmpFactionValue) {
|
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
|
} else if (lowestvalue == fmod.race_mod) { // race biggest
|
||||||
// Non-standard race (ex. illusioned to wolf)
|
// Non-standard race (ex. illusioned to wolf)
|
||||||
if (!IsPlayerRace(GetRace())) {
|
if (!IsPlayerRace(GetRace())) {
|
||||||
messageid = zone->random.Int(1, 3); // these aren't sequential StringIDs :(
|
messageid = zone->random.Int(1, 3); // these aren't sequential StringIDs :(
|
||||||
switch (messageid) {
|
switch (messageid) {
|
||||||
case 1:
|
case 1:
|
||||||
messageid = WONT_SELL_NONSTDRACE1;
|
messageid = ClientString::WONT_SELL_NONSTDRACE1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
messageid = WONT_SELL_NONSTDRACE2;
|
messageid = ClientString::WONT_SELL_NONSTDRACE2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
messageid = WONT_SELL_NONSTDRACE3;
|
messageid = ClientString::WONT_SELL_NONSTDRACE3;
|
||||||
break;
|
break;
|
||||||
default: // w/e should never happen
|
default: // w/e should never happen
|
||||||
messageid = WONT_SELL_NONSTDRACE1;
|
messageid = ClientString::WONT_SELL_NONSTDRACE1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
merchant->SayString(messageid);
|
merchant->SayString(messageid);
|
||||||
@@ -8466,30 +8466,30 @@ void Client::MerchantRejectMessage(Mob *merchant, int primaryfaction)
|
|||||||
messageid = zone->random.Int(1, 4);
|
messageid = zone->random.Int(1, 4);
|
||||||
switch (messageid) {
|
switch (messageid) {
|
||||||
case 1:
|
case 1:
|
||||||
messageid = WONT_SELL_RACE1;
|
messageid = ClientString::WONT_SELL_RACE1;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
messageid = WONT_SELL_RACE2;
|
messageid = ClientString::WONT_SELL_RACE2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
messageid = WONT_SELL_RACE3;
|
messageid = ClientString::WONT_SELL_RACE3;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
messageid = WONT_SELL_RACE4;
|
messageid = ClientString::WONT_SELL_RACE4;
|
||||||
break;
|
break;
|
||||||
default: // w/e should never happen
|
default: // w/e should never happen
|
||||||
messageid = WONT_SELL_RACE1;
|
messageid = ClientString::WONT_SELL_RACE1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
merchant->SayString(messageid, itoa(GetRace()));
|
merchant->SayString(messageid, itoa(GetRace()));
|
||||||
}
|
}
|
||||||
} else if (lowestvalue == fmod.class_mod) {
|
} 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 {
|
} else {
|
||||||
// Must be deity - these two sound the best for that.
|
// Must be deity - these two sound the best for that.
|
||||||
// Can't use a message with a field, GUI wants class/race names.
|
// Can't use a message with a field, GUI wants class/race names.
|
||||||
// for those message IDs. These are straight text.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
@@ -8526,13 +8526,13 @@ void Client::SendFactionMessage(int32 tmpvalue, int32 faction_id, int32 faction_
|
|||||||
if (tmpvalue == 0 || temp == 1 || temp == 2) {
|
if (tmpvalue == 0 || temp == 1 || temp == 2) {
|
||||||
return;
|
return;
|
||||||
} else if (faction_value >= this_faction_max) {
|
} 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) {
|
} 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)) {
|
} 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)) {
|
} 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)) {
|
} else if (RuleB(Client, UseLiveFactionMessage)) {
|
||||||
Message(
|
Message(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
@@ -8834,7 +8834,7 @@ void Client::Consume(const EQ::ItemData *item, uint8 type, int16 slot, bool auto
|
|||||||
DeleteItemInInventory(slot, 1);
|
DeleteItemInInventory(slot, 1);
|
||||||
|
|
||||||
if (!auto_consume) // no message if the client consumed for us
|
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);
|
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);
|
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
|
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);
|
LogFood("Drinking from slot: [{}]", (int)slot);
|
||||||
}
|
}
|
||||||
@@ -10388,13 +10388,13 @@ void Client::DzListTimers()
|
|||||||
{
|
{
|
||||||
found = true;
|
found = true;
|
||||||
auto time = lockout.GetTimeRemainingStrs();
|
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)
|
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)
|
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)
|
else if (client_dzs.size() == 1)
|
||||||
@@ -11909,11 +11909,11 @@ void Client::AddAAPoints(uint32 points)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (points == 1 && m_pp.aapoints == 1) {
|
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) {
|
} 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 {
|
} 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();
|
SendAlternateAdvancementStats();
|
||||||
@@ -13102,10 +13102,10 @@ void Client::SetAAEXPPercentage(uint8 percentage)
|
|||||||
const uint32 before_percentage = m_epp.perAA;
|
const uint32 before_percentage = m_epp.perAA;
|
||||||
|
|
||||||
if (before_percentage > 0 && percentage == 0) {
|
if (before_percentage > 0 && percentage == 0) {
|
||||||
MessageString(Chat::White, AA_OFF);
|
MessageString(Chat::White, ClientString::AA_OFF);
|
||||||
}
|
}
|
||||||
else if (before_percentage == 0 && percentage > 0) {
|
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);
|
m_epp.perAA = EQ::Clamp(static_cast<int>(percentage), 0, 100);
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ bool Client::DoEvolveCheckProgression(EQ::ItemInstance &inst)
|
|||||||
e.status = "Evolved Item due to obtaining progression - New Evolve Item placed in inventory.";
|
e.status = "Evolved Item due to obtaining progression - New Evolve Item placed in inventory.";
|
||||||
RecordPlayerEventLog(PlayerEvent::EVOLVE_ITEM, e);
|
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(
|
LogEvolveItem(
|
||||||
"Evolved item id <red>[{}] into item id <green>[{}] for Character ID <green>[{}]",
|
"Evolved item id <red>[{}] into item id <green>[{}] for Character ID <green>[{}]",
|
||||||
|
|||||||
+171
-171
File diff suppressed because it is too large
Load Diff
+29
-29
@@ -237,11 +237,11 @@ bool Client::Process() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (song_target == nullptr) {
|
if (song_target == nullptr) {
|
||||||
InterruptSpell(SONG_ENDS_ABRUPTLY, 0x121, bardsong);
|
InterruptSpell(ClientString::SONG_ENDS_ABRUPTLY, 0x121, bardsong);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!ApplyBardPulse(bardsong, song_target, bardsong_slot)) {
|
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 (AutoFireEnabled()) {
|
||||||
if (GetTarget() == this) {
|
if (GetTarget() == this) {
|
||||||
MessageString(Chat::TooFarAway, TRY_ATTACKING_SOMEONE);
|
MessageString(Chat::TooFarAway, ClientString::TRY_ATTACKING_SOMEONE);
|
||||||
auto_fire = false;
|
auto_fire = false;
|
||||||
}
|
}
|
||||||
EQ::ItemInstance *ranged = GetInv().GetItem(EQ::invslot::slotRange);
|
EQ::ItemInstance *ranged = GetInv().GetItem(EQ::invslot::slotRange);
|
||||||
@@ -436,10 +436,10 @@ bool Client::Process() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!CombatRange(auto_attack_target)) {
|
if (!CombatRange(auto_attack_target)) {
|
||||||
MessageString(Chat::TooFarAway, TARGET_TOO_FAR);
|
MessageString(Chat::TooFarAway, ClientString::TARGET_TOO_FAR);
|
||||||
}
|
}
|
||||||
else if (auto_attack_target == this) {
|
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) {
|
else if (!los_status || !los_status_facing) {
|
||||||
//you can't see your target
|
//you can't see your target
|
||||||
@@ -464,11 +464,11 @@ bool Client::Process() {
|
|||||||
|
|
||||||
if (GetClass() == Class::Warrior || GetClass() == Class::Berserker) {
|
if (GetClass() == Class::Warrior || GetClass() == Class::Berserker) {
|
||||||
if (!dead && !IsBerserk() && GetHPRatio() < RuleI(Combat, BerserkerFrenzyStart)) {
|
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;
|
berserk = true;
|
||||||
}
|
}
|
||||||
if (IsBerserk() && GetHPRatio() > RuleI(Combat, BerserkerFrenzyEnd)) {
|
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;
|
berserk = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1004,12 +1004,12 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
|||||||
//this resets the slot
|
//this resets the slot
|
||||||
zone->tmpmerchanttable[npcid] = temporary_merchant_list;
|
zone->tmpmerchanttable[npcid] = temporary_merchant_list;
|
||||||
if (npc && handy_item) {
|
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);
|
auto handy_id = std::to_string(greet_id);
|
||||||
if (greet_id != MERCHANT_GREETING) {
|
if (greet_id != ClientString::MERCHANT_GREETING) {
|
||||||
MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, npc->GetCleanName(), handy_id.c_str(), GetName(), handy_item->Name);
|
MessageString(Chat::NPCQuestSay, ClientString::GENERIC_STRINGID_SAY, npc->GetCleanName(), handy_id.c_str(), GetName(), handy_item->Name);
|
||||||
} else {
|
} 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;
|
uint32 tgb_flag = *(uint32 *)app->pBuffer;
|
||||||
if(tgb_flag == 2)
|
if(tgb_flag == 2)
|
||||||
MessageString(Chat::White, TGB() ? TGB_ON : TGB_OFF);
|
MessageString(Chat::White, TGB() ? ClientString::TGB_ON : ClientString::TGB_OFF);
|
||||||
else
|
else
|
||||||
tgb = tgb_flag;
|
tgb = tgb_flag;
|
||||||
}
|
}
|
||||||
@@ -1184,7 +1184,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
|||||||
) {
|
) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Red,
|
Chat::Red,
|
||||||
SPELL_LEVEL_TO_LOW,
|
ClientString::SPELL_LEVEL_TO_LOW,
|
||||||
std::to_string(spells[m->spell_id].classes[GetClass() - 1]).c_str(),
|
std::to_string(spells[m->spell_id].classes[GetClass() - 1]).c_str(),
|
||||||
spells[m->spell_id].name
|
spells[m->spell_id].name
|
||||||
);
|
);
|
||||||
@@ -1203,7 +1203,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
|||||||
RuleB(Character, RestrictSpellScribing) &&
|
RuleB(Character, RestrictSpellScribing) &&
|
||||||
!item->IsEquipable(GetRace(), GetClass())
|
!item->IsEquipable(GetRace(), GetClass())
|
||||||
) {
|
) {
|
||||||
MessageString(Chat::Red, CANNOT_USE_ITEM);
|
MessageString(Chat::Red, ClientString::CANNOT_USE_ITEM);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1792,14 +1792,14 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
|||||||
case EQ::skills::SkillJewelryMaking:
|
case EQ::skills::SkillJewelryMaking:
|
||||||
case EQ::skills::SkillPottery:
|
case EQ::skills::SkillPottery:
|
||||||
if(skilllevel >= RuleI(Skills, MaxTrainTradeskills)) {
|
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);
|
SetSkill(skill, skilllevel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EQ::skills::SkillResearch:
|
case EQ::skills::SkillResearch:
|
||||||
if(skilllevel >= RuleI(Skills, MaxTrainResearch)) {
|
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);
|
SetSkill(skill, skilllevel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1810,7 +1810,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
|||||||
case EQ::skills::SkillSpecializeDivination:
|
case EQ::skills::SkillSpecializeDivination:
|
||||||
case EQ::skills::SkillSpecializeEvocation:
|
case EQ::skills::SkillSpecializeEvocation:
|
||||||
if(skilllevel >= RuleI(Skills, MaxTrainSpecializations)) {
|
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);
|
SetSkill(skill, skilllevel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1822,7 +1822,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
|||||||
if (skilllevel >= MaxSkillValue)
|
if (skilllevel >= MaxSkillValue)
|
||||||
{
|
{
|
||||||
// Don't allow training over max skill level
|
// 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);
|
SetSkill(skill, skilllevel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1833,7 +1833,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
|||||||
if (skilllevel >= MaxSpecSkill)
|
if (skilllevel >= MaxSpecSkill)
|
||||||
{
|
{
|
||||||
// Restrict specialization training to follow the rules
|
// 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);
|
SetSkill(skill, skilllevel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2087,7 +2087,7 @@ void Client::DoTracking()
|
|||||||
auto *m = entity_list.GetMob(TrackingID);
|
auto *m = entity_list.GetMob(TrackingID);
|
||||||
|
|
||||||
if (!m || m->IsCorpse()) {
|
if (!m || m->IsCorpse()) {
|
||||||
MessageString(Chat::Skills, TRACK_LOST_TARGET);
|
MessageString(Chat::Skills, ClientString::TRACK_LOST_TARGET);
|
||||||
TrackingID = 0;
|
TrackingID = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2111,23 +2111,23 @@ void Client::DoTracking()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (relative_heading > 480) {
|
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) {
|
} 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) {
|
} 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) {
|
} 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) {
|
} 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) {
|
} 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) {
|
} 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) {
|
} 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) {
|
} else if (relative_heading >= 0) {
|
||||||
MessageString(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
|
MessageString(Chat::Skills, ClientString::TRACK_STRAIGHT_AHEAD, m->GetCleanName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+12
-12
@@ -1525,7 +1525,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
|
|||||||
|
|
||||||
if (c && inst) {
|
if (c && inst) {
|
||||||
if (c->CheckLoreConflict(item)) {
|
if (c->CheckLoreConflict(item)) {
|
||||||
c->MessageString(Chat::White, LOOT_LORE_ERROR);
|
c->MessageString(Chat::White, ClientString::LOOT_LORE_ERROR);
|
||||||
c->QueuePacket(app);
|
c->QueuePacket(app);
|
||||||
SendEndLootErrorPacket(c);
|
SendEndLootErrorPacket(c);
|
||||||
ResetLooter();
|
ResetLooter();
|
||||||
@@ -1538,7 +1538,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
|
|||||||
EQ::ItemInstance *itm = inst->GetAugment(i);
|
EQ::ItemInstance *itm = inst->GetAugment(i);
|
||||||
if (itm) {
|
if (itm) {
|
||||||
if (c->CheckLoreConflict(itm->GetItem())) {
|
if (c->CheckLoreConflict(itm->GetItem())) {
|
||||||
c->MessageString(Chat::White, LOOT_LORE_ERROR);
|
c->MessageString(Chat::White, ClientString::LOOT_LORE_ERROR);
|
||||||
c->QueuePacket(app);
|
c->QueuePacket(app);
|
||||||
SendEndLootErrorPacket(c);
|
SendEndLootErrorPacket(c);
|
||||||
ResetLooter();
|
ResetLooter();
|
||||||
@@ -1625,7 +1625,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
|
|||||||
if (dz && !dz->CanClientLootCorpse(c, GetNPCTypeID(), GetID())) {
|
if (dz && !dz->CanClientLootCorpse(c, GetNPCTypeID(), GetID())) {
|
||||||
prevent_loot = true;
|
prevent_loot = true;
|
||||||
// note on live this message is only sent once on the first loot attempt of an open corpse
|
// 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();
|
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()) {
|
if (!IsPlayerCorpse()) {
|
||||||
Group *g = c->GetGroup();
|
Group *g = c->GetGroup();
|
||||||
if (g != nullptr) {
|
if (g != nullptr) {
|
||||||
g->GroupMessageString(
|
g->GroupMessageString(
|
||||||
c, Chat::Loot,
|
c, Chat::Loot,
|
||||||
OTHER_LOOTED_MESSAGE,
|
ClientString::OTHER_LOOTED_MESSAGE,
|
||||||
c->GetName(),
|
c->GetName(),
|
||||||
linker.Link().c_str()
|
linker.Link().c_str()
|
||||||
);
|
);
|
||||||
@@ -1755,7 +1755,7 @@ void Corpse::LootCorpseItem(Client *c, const EQApplicationPacket *app)
|
|||||||
r->RaidMessageString(
|
r->RaidMessageString(
|
||||||
c,
|
c,
|
||||||
Chat::Loot,
|
Chat::Loot,
|
||||||
OTHER_LOOTED_MESSAGE,
|
ClientString::OTHER_LOOTED_MESSAGE,
|
||||||
c->GetName(),
|
c->GetName(),
|
||||||
linker.Link().c_str()
|
linker.Link().c_str()
|
||||||
);
|
);
|
||||||
@@ -1961,7 +1961,7 @@ bool Corpse::Summon(Client *c, bool spell, bool CheckDistance)
|
|||||||
m_is_corpse_changed = true;
|
m_is_corpse_changed = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c->MessageString(Chat::Red, CORPSE_TOO_FAR);
|
c->MessageString(Chat::Red, ClientString::CORPSE_TOO_FAR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1998,12 +1998,12 @@ bool Corpse::Summon(Client *c, bool spell, bool CheckDistance)
|
|||||||
m_is_corpse_changed = true;
|
m_is_corpse_changed = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c->MessageString(Chat::Red, CORPSE_TOO_FAR);
|
c->MessageString(Chat::Red, ClientString::CORPSE_TOO_FAR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c->MessageString(Chat::Red, CONSENT_DENIED);
|
c->MessageString(Chat::Red, ClientString::CONSENT_DENIED);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2312,7 +2312,7 @@ void Corpse::CastRezz(uint16 spell_id, Mob *caster)
|
|||||||
// refresh rezzed state from database
|
// refresh rezzed state from database
|
||||||
const auto &e = CharacterCorpsesRepository::FindOne(database, m_corpse_db_id);
|
const auto &e = CharacterCorpsesRepository::FindOne(database, m_corpse_db_id);
|
||||||
if (!e.id) {
|
if (!e.id) {
|
||||||
caster->MessageString(Chat::White, REZZ_ALREADY_PENDING);
|
caster->MessageString(Chat::White, ClientString::REZZ_ALREADY_PENDING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2325,8 +2325,8 @@ void Corpse::CastRezz(uint16 spell_id, Mob *caster)
|
|||||||
if (!IsRezzable()) {
|
if (!IsRezzable()) {
|
||||||
if (caster && caster->IsClient()) {
|
if (caster && caster->IsClient()) {
|
||||||
if (!caster->CastToClient()->GetGM()) {
|
if (!caster->CastToClient()->GetGM()) {
|
||||||
caster->MessageString(Chat::White, REZZ_ALREADY_PENDING);
|
caster->MessageString(Chat::White, ClientString::REZZ_ALREADY_PENDING);
|
||||||
caster->MessageString(Chat::White, CORPSE_TOO_OLD);
|
caster->MessageString(Chat::White, ClientString::CORPSE_TOO_OLD);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -200,7 +200,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
|
|||||||
if (RuleI(Adventure, ItemIDToEnablePorts) != 0) {
|
if (RuleI(Adventure, ItemIDToEnablePorts) != 0) {
|
||||||
if (!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) {
|
if (!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) {
|
||||||
if (sender->GetInv().HasItem(RuleI(Adventure, ItemIDToEnablePorts)) == INVALID_INDEX) {
|
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);
|
safe_delete(outapp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -297,7 +297,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
|
|||||||
sender->GetCleanName(),
|
sender->GetCleanName(),
|
||||||
z->flag_needed
|
z->flag_needed
|
||||||
);
|
);
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
|
sender->MessageString(Chat::LightBlue, ClientString::DOORS_LOCKED);
|
||||||
} else {
|
} else {
|
||||||
sender->Message(Chat::White, "Your GM flag allows you to use this door.");
|
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
|
* GM can always open locks
|
||||||
*/
|
*/
|
||||||
if (sender->GetGM()) {
|
if (sender->GetGM()) {
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_GM);
|
sender->MessageString(Chat::LightBlue, ClientString::DOORS_GM);
|
||||||
|
|
||||||
if (!IsDoorOpen() || (m_open_type == 58)) {
|
if (!IsDoorOpen() || (m_open_type == 58)) {
|
||||||
move_door_packet->action = static_cast<uint8>(m_invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
|
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);
|
sender->CheckIncreaseSkill(EQ::skills::SkillPickLock, nullptr, 1);
|
||||||
move_door_packet->action = static_cast<uint8>(m_invert_state == 0 ? OPEN_DOOR
|
move_door_packet->action = static_cast<uint8>(m_invert_state == 0 ? OPEN_DOOR
|
||||||
: OPEN_INVDOOR);
|
: OPEN_INVDOOR);
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
|
sender->MessageString(Chat::LightBlue, ClientString::DOORS_SUCCESSFUL_PICK);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
move_door_packet->action = static_cast<uint8>(m_invert_state == 0 ? CLOSE_DOOR
|
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 {
|
else {
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
|
sender->MessageString(Chat::LightBlue, ClientString::DOORS_INSUFFICIENT_SKILL);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_NO_PICK);
|
sender->MessageString(Chat::LightBlue, ClientString::DOORS_NO_PICK);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_CANT_PICK);
|
sender->MessageString(Chat::LightBlue, ClientString::DOORS_CANT_PICK);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -482,7 +482,7 @@ void Doors::HandleClick(Client *sender, uint8 trigger)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
|
sender->MessageString(Chat::LightBlue, ClientString::DOORS_LOCKED);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+39
-39
@@ -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
|
// 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
|
// 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());
|
LogDynamicZones("Failed to create dynamic zone for zone [{}]", dzinfo.GetZoneID());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@ DynamicZone* DynamicZone::TryCreate(Client& client, DynamicZone& dzinfo, bool si
|
|||||||
dz->SaveMembers(request.GetMembers());
|
dz->SaveMembers(request.GetMembers());
|
||||||
dz->SaveLockouts(request.GetLockouts());
|
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())
|
if (dz->GetMemberCount() < request.GetMembers().size())
|
||||||
{
|
{
|
||||||
dz->SendLeaderMessage(request.GetLeaderClient(), Chat::System, fmt::format(DzNotAllAdded,
|
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);
|
LogExpeditions("Invite [{}] to [{}] by [{}] swap [{}]", client->GetName(), GetID(), inviter, swap_name);
|
||||||
|
|
||||||
client->SetPendingDzInvite({ 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
|
// live (as of March 11 2020 patch) warns for lockouts added during current
|
||||||
// expedition that client would receive upon entering (sent in invite packet)
|
// expedition that client would receive upon entering (sent in invite packet)
|
||||||
@@ -311,13 +311,13 @@ bool DynamicZone::ConfirmLeaderCommand(Client* client)
|
|||||||
|
|
||||||
if (!GetLeader().IsValid())
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetLeaderID() != client->CharacterID())
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,14 +345,14 @@ bool DynamicZone::ProcessAddConflicts(Client* leader, Client* client, bool swapp
|
|||||||
|
|
||||||
if (IsCurrentZoneDz())
|
if (IsCurrentZoneDz())
|
||||||
{
|
{
|
||||||
SendLeaderMessage(leader, Chat::Red, DZADD_LEAVE_ZONE, { client->GetName() });
|
SendLeaderMessage(leader, Chat::Red, ClientString::DZADD_LEAVE_ZONE, { client->GetName() });
|
||||||
has_conflict = true;
|
has_conflict = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dz_id = client->GetExpeditionID();
|
auto dz_id = client->GetExpeditionID();
|
||||||
if (dz_id)
|
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() });
|
SendLeaderMessage(leader, Chat::Red, string_id, { client->GetName() });
|
||||||
has_conflict = true;
|
has_conflict = true;
|
||||||
}
|
}
|
||||||
@@ -367,14 +367,14 @@ bool DynamicZone::ProcessAddConflicts(Client* leader, Client* client, bool swapp
|
|||||||
has_conflict = true;
|
has_conflict = true;
|
||||||
|
|
||||||
auto time = lockout.GetTimeRemainingStrs();
|
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()))
|
else if (!lockout.IsReplay() && !HasLockout(lockout.Event()))
|
||||||
{
|
{
|
||||||
has_conflict = true;
|
has_conflict = true;
|
||||||
|
|
||||||
auto time = lockout.GetTimeRemainingStrs();
|
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())
|
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;
|
has_conflict = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -396,7 +396,7 @@ bool DynamicZone::ProcessAddConflicts(Client* leader, Client* client, bool swapp
|
|||||||
auto invite_id = client->GetPendingDzInviteID();
|
auto invite_id = client->GetPendingDzInviteID();
|
||||||
if (invite_id)
|
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() });
|
SendLeaderMessage(leader, Chat::Red, string_id, { client->GetName() });
|
||||||
has_conflict = true;
|
has_conflict = true;
|
||||||
}
|
}
|
||||||
@@ -423,13 +423,13 @@ void DynamicZone::TryAddClient(Client* client, const std::string& inviter, const
|
|||||||
if (!has_conflicts)
|
if (!has_conflicts)
|
||||||
{
|
{
|
||||||
// live uses the original unsanitized input string in invite messages
|
// 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() });
|
SendLeaderMessage(leader, Chat::Yellow, string_id, { client->GetName() });
|
||||||
SendClientInvite(client, inviter, swap_name);
|
SendClientInvite(client, inviter, swap_name);
|
||||||
}
|
}
|
||||||
else if (swap_name.empty()) // swap command doesn't result in this message
|
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())
|
if (IsLocked())
|
||||||
{
|
{
|
||||||
client->MessageString(Chat::Red, DZADD_NOT_ALLOWING);
|
client->MessageString(Chat::Red, ClientString::DZADD_NOT_ALLOWING);
|
||||||
invite_failed = true;
|
invite_failed = true;
|
||||||
}
|
}
|
||||||
else if (add_name.empty())
|
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;
|
invite_failed = true;
|
||||||
}
|
}
|
||||||
else
|
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
|
// live prioritizes offline message before already a member message
|
||||||
if (member_data.status == DynamicZoneMemberStatus::Offline)
|
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
|
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;
|
invite_failed = true;
|
||||||
}
|
}
|
||||||
@@ -472,7 +472,7 @@ void DynamicZone::DzAddPlayer(Client* client, const std::string& add_name, const
|
|||||||
|
|
||||||
if (invite_failed)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -512,7 +512,7 @@ void DynamicZone::DzInviteResponse(Client* client, bool accepted, const std::str
|
|||||||
|
|
||||||
if (!accepted)
|
if (!accepted)
|
||||||
{
|
{
|
||||||
SendLeaderMessage(leader, Chat::Red, DZ_INVITE_DECLINED, { client->GetName() });
|
SendLeaderMessage(leader, Chat::Red, ClientString::DZ_INVITE_DECLINED, { client->GetName() });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -521,7 +521,7 @@ void DynamicZone::DzInviteResponse(Client* client, bool accepted, const std::str
|
|||||||
|
|
||||||
if (IsLocked())
|
if (IsLocked())
|
||||||
{
|
{
|
||||||
SendLeaderMessage(leader, Chat::Red, DZADD_NOT_ALLOWING);
|
SendLeaderMessage(leader, Chat::Red, ClientString::DZADD_NOT_ALLOWING);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -540,11 +540,11 @@ void DynamicZone::DzInviteResponse(Client* client, bool accepted, const std::str
|
|||||||
|
|
||||||
if (has_conflicts)
|
if (has_conflicts)
|
||||||
{
|
{
|
||||||
SendLeaderMessage(leader, Chat::Red, DZ_INVITE_ERROR, { client->GetName() });
|
SendLeaderMessage(leader, Chat::Red, ClientString::DZ_INVITE_ERROR, { client->GetName() });
|
||||||
}
|
}
|
||||||
else
|
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
|
// replay timers are optionally added to new members on join with fresh expire time
|
||||||
if (m_add_replay)
|
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);
|
bool success = is_swap ? SwapMember(add_member, swap_name) : AddMember(add_member);
|
||||||
if (success)
|
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())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -598,11 +598,11 @@ void DynamicZone::DzRemovePlayer(Client* client, std::string name)
|
|||||||
bool removed = RemoveMember(name);
|
bool removed = RemoveMember(name);
|
||||||
if (!removed)
|
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
|
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))
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -634,7 +634,7 @@ void DynamicZone::DzPlayerList(Client* client)
|
|||||||
{
|
{
|
||||||
if (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;
|
std::vector<std::string> names;
|
||||||
for (const auto& member : m_members)
|
for (const auto& member : m_members)
|
||||||
@@ -642,7 +642,7 @@ void DynamicZone::DzPlayerList(Client* client)
|
|||||||
names.push_back(member.name);
|
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();
|
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)
|
void DynamicZone::HandleWorldMessage(ServerPacket* pack)
|
||||||
@@ -697,8 +697,8 @@ void DynamicZone::HandleWorldMessage(ServerPacket* pack)
|
|||||||
else if (Client* leader = entity_list.GetClientByName(buf->requester_name))
|
else if (Client* leader = entity_list.GetClientByName(buf->requester_name))
|
||||||
{
|
{
|
||||||
std::string target_name = FormatName(buf->target_name);
|
std::string target_name = FormatName(buf->target_name);
|
||||||
leader->MessageString(Chat::Red, DZADD_NOT_ONLINE, target_name.c_str());
|
leader->MessageString(Chat::Red, ClientString::DZADD_NOT_ONLINE, target_name.c_str());
|
||||||
leader->MessageString(Chat::Red, DZADD_INVITE_FAIL, target_name.c_str());
|
leader->MessageString(Chat::Red, ClientString::DZADD_INVITE_FAIL, target_name.c_str());
|
||||||
}
|
}
|
||||||
break;
|
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
|
// success flag is set by world to indicate new leader set to an online member
|
||||||
if (old_leader && buf->is_success)
|
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)
|
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);
|
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))
|
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;
|
break;
|
||||||
@@ -1127,7 +1127,7 @@ void DynamicZone::SendLeaderNameToZoneMembers()
|
|||||||
|
|
||||||
if (member.id == m_leader.id && RuleB(Expedition, AlwaysNotifyNewLeaderOnChange))
|
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());
|
client->QueuePacket(outapp.get());
|
||||||
|
|
||||||
// live doesn't actually send the chat message with it
|
// 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)
|
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
|
// sending clear info also clears member list for removed members
|
||||||
client->QueuePacket(CreateInfoPacket(removed).get());
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -151,10 +151,10 @@ int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) {
|
|||||||
|
|
||||||
entity_list.FilteredMessageCloseString(
|
entity_list.FilteredMessageCloseString(
|
||||||
this, true, 100, Chat::SpellCrit, FilterSpellCrits,
|
this, true, 100, Chat::SpellCrit, FilterSpellCrits,
|
||||||
OTHER_CRIT_BLAST, nullptr, GetName(), itoa(-value));
|
ClientString::OTHER_CRIT_BLAST, nullptr, GetName(), itoa(-value));
|
||||||
|
|
||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
MessageString(Chat::SpellCrit, YOU_CRIT_BLAST, itoa(-value));
|
MessageString(Chat::SpellCrit, ClientString::YOU_CRIT_BLAST, itoa(-value));
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
@@ -506,10 +506,10 @@ int64 Mob::GetActSpellHealing(uint16 spell_id, int64 value, Mob* target, bool fr
|
|||||||
if (critical_modifier > 1) {
|
if (critical_modifier > 1) {
|
||||||
entity_list.MessageCloseString(
|
entity_list.MessageCloseString(
|
||||||
this, true, 100, Chat::SpellCrit,
|
this, true, 100, Chat::SpellCrit,
|
||||||
OTHER_CRIT_HEAL, GetName(), itoa(value));
|
ClientString::OTHER_CRIT_HEAL, GetName(), itoa(value));
|
||||||
|
|
||||||
if (IsClient()) {
|
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())
|
IsPet())
|
||||||
{
|
{
|
||||||
if (IsAmnesiad()) {
|
if (IsAmnesiad()) {
|
||||||
MessageString(Chat::Red, MELEE_SILENCE);
|
MessageString(Chat::Red, ClientString::MELEE_SILENCE);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -895,7 +895,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(level_to_use > GetLevel()) {
|
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...
|
//should summon them a new one...
|
||||||
return false;
|
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
|
// sneak attack discs require you to be hidden for 4 seconds before use
|
||||||
if (spell.sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
|
if (spell.sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
|
||||||
MessageString(Chat::SpellFailure, SNEAK_RESTRICT);
|
MessageString(Chat::SpellFailure, ClientString::SNEAK_RESTRICT);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -1829,9 +1829,9 @@ void EntityList::DuelMessage(Mob *winner, Mob *loser, bool flee)
|
|||||||
//might want some sort of distance check in here?
|
//might want some sort of distance check in here?
|
||||||
if (cur != winner && cur != loser) {
|
if (cur != winner && cur != loser) {
|
||||||
if (flee)
|
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
|
else
|
||||||
cur->MessageString(Chat::Yellow, DUEL_FINISHED, winner->GetName(),loser->GetName());
|
cur->MessageString(Chat::Yellow, ClientString::DUEL_FINISHED, winner->GetName(),loser->GetName());
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
@@ -5514,7 +5514,7 @@ void EntityList::ExpeditionWarning(uint32 minutes_left)
|
|||||||
|
|
||||||
auto it = client_list.begin();
|
auto it = client_list.begin();
|
||||||
while (it != client_list.end()) {
|
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->second->QueuePacket(outapp);
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-23
@@ -342,18 +342,18 @@ void Client::CalculateLeadershipExp(uint64 &add_exp, uint8 conlevel)
|
|||||||
uint64 mentor_exp = exp * (GetGroup()->GetMentorPercent() / 100.0f);
|
uint64 mentor_exp = exp * (GetGroup()->GetMentorPercent() / 100.0f);
|
||||||
exp -= mentor_exp;
|
exp -= mentor_exp;
|
||||||
mentoree->AddLeadershipEXP(mentor_exp, 0); // ends up rounded down
|
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)
|
if (exp > 0)
|
||||||
{
|
{
|
||||||
// possible if you mentor 100% to the other client
|
// 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
|
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
|
else
|
||||||
{
|
{
|
||||||
MessageString(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
|
MessageString(Chat::LeaderShip, ClientString::MAX_GROUP_LEADERSHIP_POINTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -366,11 +366,11 @@ void Client::CalculateLeadershipExp(uint64 &add_exp, uint8 conlevel)
|
|||||||
&& RuleI(Character, KillsPerRaidLeadershipAA) > 0)
|
&& RuleI(Character, KillsPerRaidLeadershipAA) > 0)
|
||||||
{
|
{
|
||||||
AddLeadershipEXP(0, RAID_EXP_PER_POINT / RuleI(Character, KillsPerRaidLeadershipAA));
|
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
|
else
|
||||||
{
|
{
|
||||||
MessageString(Chat::LeaderShip, MAX_RAID_LEADERSHIP_POINTS);
|
MessageString(Chat::LeaderShip, ClientString::MAX_RAID_LEADERSHIP_POINTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -387,17 +387,17 @@ void Client::CalculateLeadershipExp(uint64 &add_exp, uint8 conlevel)
|
|||||||
uint64 mentor_exp = exp * (raid->GetMentorPercent(group_id) / 100.0f);
|
uint64 mentor_exp = exp * (raid->GetMentorPercent(group_id) / 100.0f);
|
||||||
exp -= mentor_exp;
|
exp -= mentor_exp;
|
||||||
mentoree->AddLeadershipEXP(mentor_exp, 0);
|
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)
|
if (exp > 0)
|
||||||
{
|
{
|
||||||
AddLeadershipEXP(exp, 0);
|
AddLeadershipEXP(exp, 0);
|
||||||
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
MessageString(Chat::LeaderShip, ClientString::GAIN_GROUP_LEADERSHIP_EXP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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 (aa_cap >= 0 && aaexp > 0) {
|
||||||
if (m_pp.aapoints == aa_cap) {
|
if (m_pp.aapoints == aa_cap) {
|
||||||
MessageString(Chat::Red, AA_CAP);
|
MessageString(Chat::Red, ClientString::AA_CAP);
|
||||||
aaexp = 0;
|
aaexp = 0;
|
||||||
m_epp.perAA = 0;
|
m_epp.perAA = 0;
|
||||||
} else if (m_pp.aapoints > aa_cap) {
|
} 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;
|
m_pp.aapoints = aa_cap;
|
||||||
aaexp = 0;
|
aaexp = 0;
|
||||||
m_epp.perAA = 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) {
|
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());
|
Message(Chat::Experience, "You regain %s experience from resurrection. %s", exp_amount_message.c_str(), exp_percent_message.c_str());
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Experience, REZ_REGAIN);
|
MessageString(Chat::Experience, ClientString::REZ_REGAIN);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (membercount > 1) {
|
if (membercount > 1) {
|
||||||
@@ -654,7 +654,7 @@ void Client::SetEXP(ExpSource exp_source, uint64 set_exp, uint64 set_aaxp, bool
|
|||||||
} else if (zone->IsHotzone()) {
|
} else if (zone->IsHotzone()) {
|
||||||
Message(Chat::Experience, "You gain party experience (with a bonus)!");
|
Message(Chat::Experience, "You gain party experience (with a bonus)!");
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Experience, GAIN_GROUPXP);
|
MessageString(Chat::Experience, ClientString::GAIN_GROUPXP);
|
||||||
}
|
}
|
||||||
} else if (IsRaidGrouped()) {
|
} else if (IsRaidGrouped()) {
|
||||||
if (RuleI(Character, ShowExpValues) > 0) {
|
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()) {
|
} else if (zone->IsHotzone()) {
|
||||||
Message(Chat::Experience, "You gained raid experience (with a bonus)!");
|
Message(Chat::Experience, "You gained raid experience (with a bonus)!");
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Experience, GAIN_RAIDEXP);
|
MessageString(Chat::Experience, ClientString::GAIN_RAIDEXP);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (RuleI(Character, ShowExpValues) > 0) {
|
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()) {
|
} else if (zone->IsHotzone()) {
|
||||||
Message(Chat::Experience, "You gain experience (with a bonus)!");
|
Message(Chat::Experience, "You gain experience (with a bonus)!");
|
||||||
} else {
|
} 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 };
|
char val2[20] = { 0 };
|
||||||
|
|
||||||
if (gained == 1 && m_pp.aapoints == 1) {
|
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) {
|
} 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 {
|
} 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)) {
|
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};
|
char val1[20]={0};
|
||||||
if (level_increase) {
|
if (level_increase) {
|
||||||
if (level_count == 1) {
|
if (level_count == 1) {
|
||||||
MessageString(Chat::Experience, GAIN_LEVEL, ConvertArray(check_level, val1));
|
MessageString(Chat::Experience, ClientString::GAIN_LEVEL, ConvertArray(check_level, val1));
|
||||||
} else {
|
} else {
|
||||||
Message(Chat::Yellow, "Welcome to level %i!", check_level);
|
Message(Chat::Yellow, "Welcome to level %i!", check_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_level == RuleI(Character, DeathItemLossLevel) &&
|
if (check_level == RuleI(Character, DeathItemLossLevel) &&
|
||||||
m_ClientVersionBit & EQ::versions::maskUFAndEarlier) {
|
m_ClientVersionBit & EQ::versions::maskUFAndEarlier) {
|
||||||
MessageString(Chat::Yellow, CORPSE_ITEM_LOST);
|
MessageString(Chat::Yellow, ClientString::CORPSE_ITEM_LOST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_level == RuleI(Character, DeathExpLossLevel)) {
|
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 val1[20]={0};
|
||||||
char val2[20]={0};
|
char val2[20]={0};
|
||||||
char val3[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) {
|
while(group_exp >= GROUP_EXP_PER_POINT) {
|
||||||
group_exp -= GROUP_EXP_PER_POINT;
|
group_exp -= GROUP_EXP_PER_POINT;
|
||||||
m_pp.group_leadership_points++;
|
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) {
|
while(raid_exp >= RAID_EXP_PER_POINT) {
|
||||||
raid_exp -= RAID_EXP_PER_POINT;
|
raid_exp -= RAID_EXP_PER_POINT;
|
||||||
m_pp.raid_leadership_points++;
|
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;
|
m_pp.group_leadership_exp = group_exp;
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ void ExpeditionRequest::SendLeaderMemberInExpedition(const std::string& name, bo
|
|||||||
|
|
||||||
if (is_solo)
|
if (is_solo)
|
||||||
{
|
{
|
||||||
SendLeaderMessage(Chat::Red, DZ_YOU_BELONG);
|
SendLeaderMessage(Chat::Red, ClientString::DZ_YOU_BELONG);
|
||||||
}
|
}
|
||||||
else if (m_requester)
|
else if (m_requester)
|
||||||
{
|
{
|
||||||
@@ -274,11 +274,11 @@ void ExpeditionRequest::SendLeaderMemberReplayLockout(const std::string& name, c
|
|||||||
auto time = lockout.GetTimeRemainingStrs();
|
auto time = lockout.GetTimeRemainingStrs();
|
||||||
if (is_solo)
|
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
|
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();
|
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()
|
bool ExpeditionRequest::IsPlayerCountValidated()
|
||||||
@@ -305,7 +305,7 @@ bool ExpeditionRequest::IsPlayerCountValidated()
|
|||||||
{
|
{
|
||||||
requirements_met = false;
|
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_members.size()).str(),
|
||||||
fmt::format_int(m_dz->GetMinPlayers()).str(),
|
fmt::format_int(m_dz->GetMinPlayers()).str(),
|
||||||
fmt::format_int(m_dz->GetMaxPlayers()).str()
|
fmt::format_int(m_dz->GetMaxPlayers()).str()
|
||||||
|
|||||||
+21
-21
@@ -196,14 +196,14 @@ bool Client::CanFish() {
|
|||||||
|
|
||||||
if (!Pole || !Pole->IsClassCommon() || Pole->GetItem()->ItemType != EQ::item::ItemTypeFishingPole) {
|
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
|
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
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Bait || !Bait->IsClassCommon() || Bait->GetItem()->ItemType != EQ::item::ItemTypeFishingBait) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ bool Client::CanFish() {
|
|||||||
float bestz = zone->zonemap->FindBestZ(rodPosition, nullptr);
|
float bestz = zone->zonemap->FindBestZ(rodPosition, nullptr);
|
||||||
float len = m_Position.z - bestz;
|
float len = m_Position.z - bestz;
|
||||||
if(len > LineLength || len < 0.0f) {
|
if(len > LineLength || len < 0.0f) {
|
||||||
MessageString(Chat::Skills, FISHING_LAND);
|
MessageString(Chat::Skills, ClientString::FISHING_LAND);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ bool Client::CanFish() {
|
|||||||
bool in_water = zone->watermap->InWater(dest) || zone->watermap->InVWater(dest);
|
bool in_water = zone->watermap->InWater(dest) || zone->watermap->InVWater(dest);
|
||||||
|
|
||||||
if (in_lava) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ bool Client::CanFish() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageString(Chat::Skills, FISHING_LAND);
|
MessageString(Chat::Skills, ClientString::FISHING_LAND);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -354,17 +354,17 @@ void Client::GoFish(bool guarantee, bool use_bait)
|
|||||||
if (food_item) {
|
if (food_item) {
|
||||||
|
|
||||||
if (food_item->ItemType != EQ::item::ItemTypeFood) {
|
if (food_item->ItemType != EQ::item::ItemTypeFood) {
|
||||||
MessageString(Chat::Skills, FISHING_SUCCESS);
|
MessageString(Chat::Skills, ClientString::FISHING_SUCCESS);
|
||||||
}
|
}
|
||||||
else {
|
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);
|
EQ::ItemInstance* inst = database.CreateItem(food_item, 1);
|
||||||
if (inst != nullptr) {
|
if (inst != nullptr) {
|
||||||
if (CheckLoreConflict(inst->GetItem()))
|
if (CheckLoreConflict(inst->GetItem()))
|
||||||
{
|
{
|
||||||
MessageString(Chat::White, DUP_LORE);
|
MessageString(Chat::White, ClientString::DUP_LORE);
|
||||||
safe_delete(inst);
|
safe_delete(inst);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -408,13 +408,13 @@ void Client::GoFish(bool guarantee, bool use_bait)
|
|||||||
//chance to use bait when you dont catch anything...
|
//chance to use bait when you dont catch anything...
|
||||||
if (zone->random.Int(0, 4) == 1) {
|
if (zone->random.Int(0, 4) == 1) {
|
||||||
DeleteItemInInventory(bslot, 1, true); //do we need client update?
|
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 {
|
} 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
|
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
|
//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
|
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{});
|
RecordPlayerEventLog(PlayerEvent::FISH_FAILURE, PlayerEvent::EmptyEvent{});
|
||||||
@@ -431,7 +431,7 @@ void Client::GoFish(bool guarantee, bool use_bait)
|
|||||||
if (Pole) {
|
if (Pole) {
|
||||||
const EQ::ItemData* fishing_item = Pole->GetItem();
|
const EQ::ItemData* fishing_item = Pole->GetItem();
|
||||||
if (fishing_item && fishing_item->SubType == 0 && zone->random.Int(0, 49) == 1) {
|
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);
|
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
|
// these may need to be fine tuned, I am just guessing here
|
||||||
if (guarantee || zone->random.Int(0,199) < skill_level) {
|
if (guarantee || zone->random.Int(0,199) < skill_level) {
|
||||||
uint32 foragedfood = 0;
|
uint32 foragedfood = 0;
|
||||||
uint32 stringid = FORAGE_NOEAT;
|
uint32 stringid = ClientString::FORAGE_NOEAT;
|
||||||
|
|
||||||
if (zone->random.Roll(RuleI(Zone, ForageChance))) {
|
if (zone->random.Roll(RuleI(Zone, ForageChance))) {
|
||||||
foragedfood = content_db.LoadForage(m_pp.zone_id, skill_level);
|
foragedfood = content_db.LoadForage(m_pp.zone_id, skill_level);
|
||||||
@@ -482,17 +482,17 @@ void Client::ForageItem(bool guarantee) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (foragedfood == 13106) {
|
if (foragedfood == 13106) {
|
||||||
stringid = FORAGE_GRUBS;
|
stringid = ClientString::FORAGE_GRUBS;
|
||||||
} else {
|
} else {
|
||||||
switch(food_item->ItemType) {
|
switch(food_item->ItemType) {
|
||||||
case EQ::item::ItemTypeFood:
|
case EQ::item::ItemTypeFood:
|
||||||
stringid = FORAGE_FOOD;
|
stringid = ClientString::FORAGE_FOOD;
|
||||||
break;
|
break;
|
||||||
case EQ::item::ItemTypeDrink:
|
case EQ::item::ItemTypeDrink:
|
||||||
if (strstr(food_item->Name, "ater")) {
|
if (strstr(food_item->Name, "ater")) {
|
||||||
stringid = FORAGE_WATER;
|
stringid = ClientString::FORAGE_WATER;
|
||||||
} else {
|
} else {
|
||||||
stringid = FORAGE_DRINK;
|
stringid = ClientString::FORAGE_DRINK;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -505,7 +505,7 @@ void Client::ForageItem(bool guarantee) {
|
|||||||
if (inst != nullptr) {
|
if (inst != nullptr) {
|
||||||
// check to make sure it isn't a foraged lore item
|
// check to make sure it isn't a foraged lore item
|
||||||
if (CheckLoreConflict(inst->GetItem())) {
|
if (CheckLoreConflict(inst->GetItem())) {
|
||||||
MessageString(Chat::White, DUP_LORE);
|
MessageString(Chat::White, ClientString::DUP_LORE);
|
||||||
safe_delete(inst);
|
safe_delete(inst);
|
||||||
} else {
|
} else {
|
||||||
PushItemOnCursor(*inst);
|
PushItemOnCursor(*inst);
|
||||||
@@ -544,11 +544,11 @@ void Client::ForageItem(bool guarantee) {
|
|||||||
|
|
||||||
int ChanceSecondForage = aabonuses.ForageAdditionalItems + itembonuses.ForageAdditionalItems + spellbonuses.ForageAdditionalItems;
|
int ChanceSecondForage = aabonuses.ForageAdditionalItems + itembonuses.ForageAdditionalItems + spellbonuses.ForageAdditionalItems;
|
||||||
if (!guarantee && zone->random.Roll(ChanceSecondForage)) {
|
if (!guarantee && zone->random.Roll(ChanceSecondForage)) {
|
||||||
MessageString(Chat::Skills, FORAGE_MASTERY);
|
MessageString(Chat::Skills, ClientString::FORAGE_MASTERY);
|
||||||
ForageItem(true);
|
ForageItem(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Skills, FORAGE_FAILED);
|
MessageString(Chat::Skills, ClientString::FORAGE_FAILED);
|
||||||
RecordPlayerEventLog(PlayerEvent::FORAGE_FAILURE, PlayerEvent::EmptyEvent{});
|
RecordPlayerEventLog(PlayerEvent::FORAGE_FAILURE, PlayerEvent::EmptyEvent{});
|
||||||
|
|
||||||
if (parse->PlayerHasQuestSub(EVENT_FORAGE_FAILURE)) {
|
if (parse->PlayerHasQuestSub(EVENT_FORAGE_FAILURE)) {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ void command_parcels(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
auto player_id = CharacterParcelsRepository::GetParcelCountAndCharacterName(database, player_name);
|
auto player_id = CharacterParcelsRepository::GetParcelCountAndCharacterName(database, player_name);
|
||||||
if (!player_id.at(0).char_id) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ void command_parcels(Client *c, const Seperator *sep)
|
|||||||
to_name
|
to_name
|
||||||
);
|
);
|
||||||
if (send_to_client.at(0).character_name.empty()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ void command_parcels(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
c->MessageString(
|
c->MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
PARCEL_DELIVERY,
|
ClientString::PARCEL_DELIVERY,
|
||||||
c->GetCleanName(),
|
c->GetCleanName(),
|
||||||
"Money",
|
"Money",
|
||||||
send_to_client.at(0).character_name.c_str()
|
send_to_client.at(0).character_name.c_str()
|
||||||
@@ -289,7 +289,7 @@ void command_parcels(Client *c, const Seperator *sep)
|
|||||||
|
|
||||||
c->MessageString(
|
c->MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
PARCEL_DELIVERY,
|
ClientString::PARCEL_DELIVERY,
|
||||||
c->GetCleanName(),
|
c->GetCleanName(),
|
||||||
inst->GetItem()->Name,
|
inst->GetItem()->Name,
|
||||||
send_to_client.at(0).character_name.c_str()
|
send_to_client.at(0).character_name.c_str()
|
||||||
@@ -319,4 +319,4 @@ void command_parcels(Client *c, const Seperator *sep)
|
|||||||
c->SendParcelDeliveryToWorld(ps);
|
c->SendParcelDeliveryToWorld(ps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -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"
|
// 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) {
|
if (share && member_client != splitter) {
|
||||||
member_client->MessageString(
|
member_client->MessageString(
|
||||||
YOU_RECEIVE_AS_SPLIT,
|
ClientString::YOU_RECEIVE_AS_SPLIT,
|
||||||
SHARE_MONEY,
|
ClientString::SHARE_MONEY,
|
||||||
splitter->GetCleanName()
|
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->AddMoneyToPP(receive_copper, receive_silver, receive_gold, receive_platinum, true);
|
||||||
member_client->MessageString(
|
member_client->MessageString(
|
||||||
Chat::MoneySplit,
|
Chat::MoneySplit,
|
||||||
YOU_RECEIVE_AS_SPLIT,
|
ClientString::YOU_RECEIVE_AS_SPLIT,
|
||||||
Strings::Money(receive_platinum, receive_gold, receive_silver, receive_copper).c_str()
|
Strings::Money(receive_platinum, receive_gold, receive_silver, receive_copper).c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -405,7 +405,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack)
|
|||||||
c.second->SendGuildActiveTributes(c.second->GuildID());
|
c.second->SendGuildActiveTributes(c.second->GuildID());
|
||||||
c.second->SendGuildDeletePacket(s->guild_id);
|
c.second->SendGuildDeletePacket(s->guild_id);
|
||||||
c.second->RefreshGuildInfo();
|
c.second->RefreshGuildInfo();
|
||||||
c.second->MessageString(Chat::Guild, GUILD_DISBANDED);
|
c.second->MessageString(Chat::Guild, ClientString::GUILD_DISBANDED);
|
||||||
c.second->SendGuildList();
|
c.second->SendGuildList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -125,7 +125,7 @@ const NPCType *Horse::BuildHorseType(uint16 spell_id)
|
|||||||
void Client::SummonHorse(uint16 spell_id)
|
void Client::SummonHorse(uint16 spell_id)
|
||||||
{
|
{
|
||||||
if (GetHorseId()) {
|
if (GetHorseId()) {
|
||||||
MessageString(Chat::Red, ALREADY_ON_A_MOUNT);
|
MessageString(Chat::Red, ClientString::ALREADY_ON_A_MOUNT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1210,7 +1210,7 @@ void Merc::AI_Process() {
|
|||||||
{
|
{
|
||||||
if(zone->random.Roll(flurrychance))
|
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);
|
||||||
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);
|
realTotal = CalcFocusEffect(type, UsedFocusID, spell_id);
|
||||||
|
|
||||||
if (realTotal != 0 && UsedItem)
|
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.
|
//Check if spell focus effect exists for the client.
|
||||||
|
|||||||
+20
-20
@@ -5050,13 +5050,13 @@ void Mob::Say(const char *format, ...)
|
|||||||
std::string new_message = EQ::SayLinkEngine::InjectSaylinksIfNotExist(buf);
|
std::string new_message = EQ::SayLinkEngine::InjectSaylinksIfNotExist(buf);
|
||||||
entity_list.MessageCloseString(
|
entity_list.MessageCloseString(
|
||||||
talker, false, distance, Chat::NPCQuestSay,
|
talker, false, distance, Chat::NPCQuestSay,
|
||||||
GENERIC_SAY, GetCleanName(), new_message.c_str()
|
ClientString::GENERIC_SAY, GetCleanName(), new_message.c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
entity_list.MessageCloseString(
|
entity_list.MessageCloseString(
|
||||||
talker, false, distance, Chat::NPCQuestSay,
|
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(
|
entity_list.MessageCloseString(
|
||||||
this, false, 200, 10,
|
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
|
message6, message7, message8, message9
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -5085,7 +5085,7 @@ void Mob::SayString(uint32 type, uint32 string_id, const char *message3, const c
|
|||||||
|
|
||||||
entity_list.MessageCloseString(
|
entity_list.MessageCloseString(
|
||||||
this, false, 200, type,
|
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
|
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);
|
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)
|
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);
|
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, ...)
|
void Mob::Shout(const char *format, ...)
|
||||||
@@ -5120,7 +5120,7 @@ void Mob::Shout(const char *format, ...)
|
|||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
entity_list.MessageString(this, false, Chat::Shout,
|
entity_list.MessageString(this, false, Chat::Shout,
|
||||||
GENERIC_SHOUT, GetCleanName(), buf);
|
ClientString::GENERIC_SHOUT, GetCleanName(), buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mob::Emote(const char *format, ...)
|
void Mob::Emote(const char *format, ...)
|
||||||
@@ -5134,7 +5134,7 @@ void Mob::Emote(const char *format, ...)
|
|||||||
|
|
||||||
entity_list.MessageCloseString(
|
entity_list.MessageCloseString(
|
||||||
this, false, 200, 10,
|
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)) {
|
if (IsSilenced() && !IsDiscipline(spell_id)) {
|
||||||
MessageString(Chat::Red, SILENCED_STRING);
|
MessageString(Chat::Red, ClientString::SILENCED_STRING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsAmnesiad() && IsDiscipline(spell_id)) {
|
if (IsAmnesiad() && IsDiscipline(spell_id)) {
|
||||||
MessageString(Chat::Red, MELEE_SILENCE);
|
MessageString(Chat::Red, ClientString::MELEE_SILENCE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7154,16 +7154,16 @@ void Mob::SlowMitigation(Mob* caster)
|
|||||||
if (GetSlowMitigation() && caster && caster->IsClient())
|
if (GetSlowMitigation() && caster && caster->IsClient())
|
||||||
{
|
{
|
||||||
if ((GetSlowMitigation() > 0) && (GetSlowMitigation() < 26))
|
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))
|
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))
|
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)
|
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 (!can_shield_npc && shield_target->IsNPC()) {
|
||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
MessageString(Chat::White, SHIELD_TARGET_NPC);
|
MessageString(Chat::White, ClientString::SHIELD_TARGET_NPC);
|
||||||
}
|
}
|
||||||
return false;
|
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'
|
//You have a shielder, or your 'Shield Target' already has a 'Shielder'
|
||||||
if (GetShielderID() || shield_target->GetShielderID()) {
|
if (GetShielderID() || shield_target->GetShielderID()) {
|
||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
MessageString(Chat::White, ALREADY_SHIELDED);
|
MessageString(Chat::White, ClientString::ALREADY_SHIELDED);
|
||||||
}
|
}
|
||||||
return false;
|
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'
|
//You are being shielded or already have a 'Shield Target'
|
||||||
if (GetShieldTargetID() || shield_target->GetShieldTargetID()) {
|
if (GetShieldTargetID() || shield_target->GetShieldTargetID()) {
|
||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
MessageString(Chat::White, ALREADY_SHIELDING);
|
MessageString(Chat::White, ClientString::ALREADY_SHIELDING);
|
||||||
}
|
}
|
||||||
return false;
|
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)) {
|
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;
|
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());
|
SetShieldTargetID(shield_target->GetID());
|
||||||
SetShielderMitigation(shielder_mitigation);
|
SetShielderMitigation(shielder_mitigation);
|
||||||
@@ -8025,7 +8025,7 @@ void Mob::ShieldAbilityFinish()
|
|||||||
Mob* shield_target = entity_list.GetMob(GetShieldTargetID());
|
Mob* shield_target = entity_list.GetMob(GetShieldTargetID());
|
||||||
|
|
||||||
if (shield_target) {
|
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->SetShielderID(0);
|
||||||
shield_target->SetShieldTargetMitigation(0);
|
shield_target->SetShieldTargetMitigation(0);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-10
@@ -529,7 +529,7 @@ void NPC::AI_Stop() {
|
|||||||
|
|
||||||
void Client::AI_Stop() {
|
void Client::AI_Stop() {
|
||||||
Mob::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));
|
auto app = new EQApplicationPacket(OP_Charm, sizeof(Charm_Struct));
|
||||||
Charm_Struct *ps = (Charm_Struct*)app->pBuffer;
|
Charm_Struct *ps = (Charm_Struct*)app->pBuffer;
|
||||||
@@ -1101,7 +1101,7 @@ void Mob::AI_Process() {
|
|||||||
|
|
||||||
auto pet_owner = GetOwner();
|
auto pet_owner = GetOwner();
|
||||||
if (pet_owner && pet_owner->IsClient()) {
|
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);
|
RemoveFromHateList(target);
|
||||||
@@ -1960,14 +1960,14 @@ void Mob::StartEnrage()
|
|||||||
|
|
||||||
// start the timer. need to call IsEnraged frequently since we dont have callback timers :-/
|
// start the timer. need to call IsEnraged frequently since we dont have callback timers :-/
|
||||||
bEnraged = true;
|
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(){
|
void Mob::ProcessEnrage(){
|
||||||
if(IsEnraged()){
|
if(IsEnraged()){
|
||||||
Timer *timer = GetSpecialAbilityTimer(SpecialAbility::Enrage);
|
Timer *timer = GetSpecialAbilityTimer(SpecialAbility::Enrage);
|
||||||
if(timer && timer->Check()){
|
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);
|
int enraged_cooldown = GetSpecialAbilityParam(SpecialAbility::Enrage, 2);
|
||||||
enraged_cooldown = enraged_cooldown > 0 ? enraged_cooldown : EnragedTimer;
|
enraged_cooldown = enraged_cooldown > 0 ? enraged_cooldown : EnragedTimer;
|
||||||
@@ -1993,7 +1993,7 @@ bool Mob::Flurry(ExtraAttackOptions *opts)
|
|||||||
true,
|
true,
|
||||||
200,
|
200,
|
||||||
Chat::PetFlurry,
|
Chat::PetFlurry,
|
||||||
NPC_FLURRY,
|
ClientString::NPC_FLURRY,
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
target->GetCleanName());
|
target->GetCleanName());
|
||||||
} else {
|
} else {
|
||||||
@@ -2002,7 +2002,7 @@ bool Mob::Flurry(ExtraAttackOptions *opts)
|
|||||||
true,
|
true,
|
||||||
200,
|
200,
|
||||||
Chat::NPCFlurry,
|
Chat::NPCFlurry,
|
||||||
NPC_FLURRY,
|
ClientString::NPC_FLURRY,
|
||||||
GetCleanName(),
|
GetCleanName(),
|
||||||
target->GetCleanName());
|
target->GetCleanName());
|
||||||
}
|
}
|
||||||
@@ -2070,9 +2070,9 @@ bool Mob::Rampage(ExtraAttackOptions *opts)
|
|||||||
{
|
{
|
||||||
int index_hit = 0;
|
int index_hit = 0;
|
||||||
if (IsPet() || IsTempPet() || IsCharmed() || IsAnimation()){
|
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 {
|
} 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);
|
int rampage_targets = GetSpecialAbilityParam(SpecialAbility::Rampage, 1);
|
||||||
@@ -2143,9 +2143,9 @@ void Mob::AreaRampage(ExtraAttackOptions *opts)
|
|||||||
{
|
{
|
||||||
int index_hit = 0;
|
int index_hit = 0;
|
||||||
if (IsPet() || IsTempPet() || IsCharmed() || IsAnimation()) { // do not know every pet AA so thought it safer to add this
|
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 {
|
} 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);
|
int rampage_targets = GetSpecialAbilityParam(SpecialAbility::AreaRampage, 1);
|
||||||
|
|||||||
+4
-4
@@ -1852,17 +1852,17 @@ void NPC::Disarm(Client* client, int chance) {
|
|||||||
SendWearChange(matslot);
|
SendWearChange(matslot);
|
||||||
if ((CastToMob()->GetBodyType() == BodyType::Humanoid || CastToMob()->GetBodyType() == BodyType::Summoned) && eslot == EQ::invslot::slotPrimary)
|
if ((CastToMob()->GetBodyType() == BodyType::Humanoid || CastToMob()->GetBodyType() == BodyType::Summoned) && eslot == EQ::invslot::slotPrimary)
|
||||||
Say("Ahh! My weapon!");
|
Say("Ahh! My weapon!");
|
||||||
client->MessageString(Chat::Skills, DISARM_SUCCESS, GetCleanName());
|
client->MessageString(Chat::Skills, ClientString::DISARM_SUCCESS, GetCleanName());
|
||||||
if (chance != 1000)
|
if (chance != 1000)
|
||||||
client->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 4);
|
client->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
client->MessageString(Chat::Skills, DISARM_FAILED);
|
client->MessageString(Chat::Skills, ClientString::DISARM_FAILED);
|
||||||
if (chance != 1000)
|
if (chance != 1000)
|
||||||
client->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 2);
|
client->CheckIncreaseSkill(EQ::skills::SkillDisarm, nullptr, 2);
|
||||||
return;
|
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) {
|
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,
|
true,
|
||||||
200,
|
200,
|
||||||
Chat::NPCQuestSay,
|
Chat::NPCQuestSay,
|
||||||
GENERIC_STRING,
|
ClientString::GENERIC_STRING,
|
||||||
processed.c_str()
|
processed.c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-14
@@ -242,7 +242,7 @@ void Client::SendParcelStatus()
|
|||||||
else if (num_over_limit == 1) {
|
else if (num_over_limit == 1) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Red,
|
Chat::Red,
|
||||||
PARCEL_STATUS_1,
|
ClientString::PARCEL_STATUS_1,
|
||||||
std::to_string(num_of_parcels).c_str(),
|
std::to_string(num_of_parcels).c_str(),
|
||||||
std::to_string(RuleI(Parcel, ParcelMaxItems)).c_str()
|
std::to_string(RuleI(Parcel, ParcelMaxItems)).c_str()
|
||||||
);
|
);
|
||||||
@@ -250,7 +250,7 @@ void Client::SendParcelStatus()
|
|||||||
else if (num_over_limit > 1) {
|
else if (num_over_limit > 1) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Red,
|
Chat::Red,
|
||||||
PARCEL_STATUS_2,
|
ClientString::PARCEL_STATUS_2,
|
||||||
std::to_string(num_of_parcels).c_str(),
|
std::to_string(num_of_parcels).c_str(),
|
||||||
std::to_string(num_over_limit).c_str(),
|
std::to_string(num_over_limit).c_str(),
|
||||||
std::to_string(RuleI(Parcel, ParcelMaxItems)).c_str()
|
std::to_string(RuleI(Parcel, ParcelMaxItems)).c_str()
|
||||||
@@ -331,7 +331,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!GetParcelEnabled()) {
|
if (!GetParcelEnabled()) {
|
||||||
MessageString(Chat::Yellow, PARCEL_DELAY, merchant->GetCleanName());
|
MessageString(Chat::Yellow, ClientString::PARCEL_DELAY, merchant->GetCleanName());
|
||||||
DoParcelCancel();
|
DoParcelCancel();
|
||||||
SendParcelAck();
|
SendParcelAck();
|
||||||
return;
|
return;
|
||||||
@@ -371,7 +371,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
|
|||||||
if (send_to_client.at(0).character_name.empty()) {
|
if (send_to_client.at(0).character_name.empty()) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
PARCEL_UNKNOWN_NAME,
|
ClientString::PARCEL_UNKNOWN_NAME,
|
||||||
merchant->GetCleanName(),
|
merchant->GetCleanName(),
|
||||||
parcel_in->send_to,
|
parcel_in->send_to,
|
||||||
inst->GetItem()->Name
|
inst->GetItem()->Name
|
||||||
@@ -462,7 +462,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
|
|||||||
|
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
PARCEL_DELIVERY,
|
ClientString::PARCEL_DELIVERY,
|
||||||
merchant->GetCleanName(),
|
merchant->GetCleanName(),
|
||||||
inst->GetItem()->Name,
|
inst->GetItem()->Name,
|
||||||
send_to_client.at(0).character_name.c_str()
|
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()) {
|
if (send_to_client.at(0).character_name.empty()) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
PARCEL_UNKNOWN_NAME,
|
ClientString::PARCEL_UNKNOWN_NAME,
|
||||||
merchant->GetCleanName(),
|
merchant->GetCleanName(),
|
||||||
parcel_in->send_to,
|
parcel_in->send_to,
|
||||||
"Money"
|
"Money"
|
||||||
@@ -566,7 +566,7 @@ void Client::DoParcelSend(const Parcel_Struct *parcel_in)
|
|||||||
|
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
PARCEL_DELIVERY,
|
ClientString::PARCEL_DELIVERY,
|
||||||
merchant->GetCleanName(),
|
merchant->GetCleanName(),
|
||||||
"Money",
|
"Money",
|
||||||
send_to_client.at(0).character_name.c_str()
|
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: {
|
case PARCEL_MONEY_ITEM_ID: {
|
||||||
AddMoneyToPP(p->second.quantity, true);
|
AddMoneyToPP(p->second.quantity, true);
|
||||||
MessageString(
|
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;
|
break;
|
||||||
}
|
}
|
||||||
@@ -717,11 +717,11 @@ void Client::DoParcelRetrieve(const ParcelRetrieve_Struct &parcel_in)
|
|||||||
|
|
||||||
if (CheckLoreConflict(item->GetItem())) {
|
if (CheckLoreConflict(item->GetItem())) {
|
||||||
if (RuleB(Parcel, DeleteOnDuplicate)) {
|
if (RuleB(Parcel, DeleteOnDuplicate)) {
|
||||||
MessageString(Chat::Yellow, PARCEL_DUPLICATE_DELETE, inst->GetItem()->Name);
|
MessageString(Chat::Yellow, ClientString::PARCEL_DUPLICATE_DELETE, inst->GetItem()->Name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageString(Chat::Yellow, DUP_LORE);
|
MessageString(Chat::Yellow, ClientString::DUP_LORE);
|
||||||
SendParcelRetrieveAck();
|
SendParcelRetrieveAck();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -733,16 +733,16 @@ void Client::DoParcelRetrieve(const ParcelRetrieve_Struct &parcel_in)
|
|||||||
auto const free_id = GetInv().FindFirstFreeSlotThatFitsItemWithStacking(inst.get());
|
auto const free_id = GetInv().FindFirstFreeSlotThatFitsItemWithStacking(inst.get());
|
||||||
if (free_id == INVALID_INDEX) {
|
if (free_id == INVALID_INDEX) {
|
||||||
SendParcelRetrieveAck();
|
SendParcelRetrieveAck();
|
||||||
MessageString(Chat::White, PARCEL_INV_FULL, merchant->GetCleanName());
|
MessageString(Chat::White, ClientString::PARCEL_INV_FULL, merchant->GetCleanName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CheckLoreConflict(inst->GetItem())) {
|
if (CheckLoreConflict(inst->GetItem())) {
|
||||||
if (RuleB(Parcel, DeleteOnDuplicate)) {
|
if (RuleB(Parcel, DeleteOnDuplicate)) {
|
||||||
MessageString(Chat::Yellow, PARCEL_DUPLICATE_DELETE, inst->GetItem()->Name);
|
MessageString(Chat::Yellow, ClientString::PARCEL_DUPLICATE_DELETE, inst->GetItem()->Name);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MessageString(Chat::Yellow, DUP_LORE);
|
MessageString(Chat::Yellow, ClientString::DUP_LORE);
|
||||||
SendParcelRetrieveAck();
|
SendParcelRetrieveAck();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -751,7 +751,7 @@ void Client::DoParcelRetrieve(const ParcelRetrieve_Struct &parcel_in)
|
|||||||
if (AutoPutLootInInventory(*inst.get(), false, true)) {
|
if (AutoPutLootInInventory(*inst.get(), false, true)) {
|
||||||
MessageString(
|
MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
PARCEL_DELIVERED_2,
|
ClientString::PARCEL_DELIVERED_2,
|
||||||
merchant->GetCleanName(),
|
merchant->GetCleanName(),
|
||||||
std::to_string(item_quantity).c_str(),
|
std::to_string(item_quantity).c_str(),
|
||||||
inst->GetItem()->Name,
|
inst->GetItem()->Name,
|
||||||
|
|||||||
+10
-10
@@ -979,7 +979,7 @@ void Raid::SplitMoney(uint32 gid, uint32 copper, uint32 silver, uint32 gold, uin
|
|||||||
|
|
||||||
m.member->MessageString(
|
m.member->MessageString(
|
||||||
Chat::MoneySplit,
|
Chat::MoneySplit,
|
||||||
YOU_RECEIVE_AS_SPLIT,
|
ClientString::YOU_RECEIVE_AS_SPLIT,
|
||||||
Strings::Money(
|
Strings::Money(
|
||||||
platinum_split,
|
platinum_split,
|
||||||
gold_split,
|
gold_split,
|
||||||
@@ -2317,13 +2317,13 @@ void Raid::DelegateAbilityAssist(Mob* delegator, const char* delegatee)
|
|||||||
{
|
{
|
||||||
auto raid_delegatee = entity_list.GetRaidByName(delegatee);
|
auto raid_delegatee = entity_list.GetRaidByName(delegatee);
|
||||||
if (!raid_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;
|
return;
|
||||||
}
|
}
|
||||||
uint32 raid_delegatee_id = raid_delegatee->GetID();
|
uint32 raid_delegatee_id = raid_delegatee->GetID();
|
||||||
uint32 raid_delegator_id = GetID();
|
uint32 raid_delegator_id = GetID();
|
||||||
if (raid_delegatee_id != raid_delegator_id) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2339,7 +2339,7 @@ void Raid::DelegateAbilityAssist(Mob* delegator, const char* delegatee)
|
|||||||
auto slot = FindNextRaidDelegateSlot(FindNextAssisterSlot);
|
auto slot = FindNextRaidDelegateSlot(FindNextAssisterSlot);
|
||||||
auto ma = rm->main_assister;
|
auto ma = rm->main_assister;
|
||||||
if (slot == -1 && !ma) {
|
if (slot == -1 && !ma) {
|
||||||
delegator->CastToClient()->MessageString(Chat::Cyan, MAX_MAIN_RAID_ASSISTERS);
|
delegator->CastToClient()->MessageString(Chat::Cyan, ClientString::MAX_MAIN_RAID_ASSISTERS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2454,13 +2454,13 @@ void Raid::DelegateAbilityMark(Mob* delegator, const char* delegatee)
|
|||||||
{
|
{
|
||||||
auto raid_delegatee = entity_list.GetRaidByName(delegatee);
|
auto raid_delegatee = entity_list.GetRaidByName(delegatee);
|
||||||
if (!raid_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;
|
return;
|
||||||
}
|
}
|
||||||
uint32 raid_delegatee_id = raid_delegatee->GetID();
|
uint32 raid_delegatee_id = raid_delegatee->GetID();
|
||||||
uint32 raid_delegator_id = GetID();
|
uint32 raid_delegator_id = GetID();
|
||||||
if (raid_delegatee_id != raid_delegator_id) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2477,7 +2477,7 @@ void Raid::DelegateAbilityMark(Mob* delegator, const char* delegatee)
|
|||||||
auto mm = rm->main_marker;
|
auto mm = rm->main_marker;
|
||||||
|
|
||||||
if (slot == -1 && !mm) {
|
if (slot == -1 && !mm) {
|
||||||
delegator->CastToClient()->MessageString(Chat::Cyan, MAX_MAIN_RAID_MARKERS);
|
delegator->CastToClient()->MessageString(Chat::Cyan, ClientString::MAX_MAIN_RAID_MARKERS);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2609,7 +2609,7 @@ void Raid::RaidMarkNPC(Mob* mob, uint32 parameter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//client is not delegated the mark ability
|
//client is not delegated the mark ability
|
||||||
c->MessageString(Chat::Cyan, NOT_DELEGATED_MARKER);
|
c->MessageString(Chat::Cyan, ClientString::NOT_DELEGATED_MARKER);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2638,7 +2638,7 @@ void Raid::RaidClearNPCMarks(Client* c)
|
|||||||
&& marked_npcs[i].instance_id == c->GetInstanceID())
|
&& marked_npcs[i].instance_id == c->GetInstanceID())
|
||||||
{
|
{
|
||||||
auto npc_name = entity_list.GetNPCByID(marked_npcs[i].entity_id)->GetCleanName();
|
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].entity_id = 0;
|
||||||
marked_npcs[i].zone_id = 0;
|
marked_npcs[i].zone_id = 0;
|
||||||
marked_npcs[i].instance_id = 0;
|
marked_npcs[i].instance_id = 0;
|
||||||
@@ -2665,7 +2665,7 @@ void Raid::RaidClearNPCMarks(Client* c)
|
|||||||
UpdateXtargetMarkedNPC();
|
UpdateXtargetMarkedNPC();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
c->MessageString(Chat::Cyan, NOT_DELEGATED_MARKER);
|
c->MessageString(Chat::Cyan, ClientString::NOT_DELEGATED_MARKER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-13
@@ -254,7 +254,7 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQ::skills::SkillType skill, int32 bas
|
|||||||
auto fbash = GetSpellFuriousBash(itm->Focus.Effect);
|
auto fbash = GetSpellFuriousBash(itm->Focus.Effect);
|
||||||
hate = hate * (100 + fbash) / 100;
|
hate = hate * (100 + fbash) / 100;
|
||||||
if (fbash)
|
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);
|
const EQ::ItemInstance *wpn = CastToClient()->GetInv().GetItem(EQ::invslot::slotPrimary);
|
||||||
|
|
||||||
if (!wpn || (wpn->GetItem()->ItemType != EQ::item::ItemType1HPiercing)){
|
if (!wpn || (wpn->GetItem()->ItemType != EQ::item::ItemType1HPiercing)){
|
||||||
MessageString(Chat::Red, BACKSTAB_WEAPON);
|
MessageString(Chat::Red, ClientString::BACKSTAB_WEAPON);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -965,10 +965,10 @@ bool Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
|||||||
|
|
||||||
if (float dist = DistanceSquared(m_Position, other->GetPosition()); dist > range) {
|
if (float dist = DistanceSquared(m_Position, other->GetPosition()); dist > range) {
|
||||||
LogCombat("Ranged attack out of range client should catch this. ([{}] > [{}]).\n", 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;
|
return false;
|
||||||
} else if (dist < (RuleI(Combat, MinRangedAttackDist)*RuleI(Combat, MinRangedAttackDist))){
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1585,11 +1585,11 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
|
|||||||
float dist = DistanceSquared(m_Position, other->GetPosition());
|
float dist = DistanceSquared(m_Position, other->GetPosition());
|
||||||
if(dist > range) {
|
if(dist > range) {
|
||||||
LogCombat("Throwing attack out of range client should catch this. ([{}] > [{}]).\n", 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;
|
return;
|
||||||
}
|
}
|
||||||
else if(dist < (RuleI(Combat, MinRangedAttackDist)*RuleI(Combat, MinRangedAttackDist))){
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1910,7 +1910,7 @@ void NPC::DoClassAttacks(Mob *target) {
|
|||||||
type_of_pet != PetType::TargetLock &&
|
type_of_pet != PetType::TargetLock &&
|
||||||
DistanceSquared(GetPosition(), target->GetPosition()) <= (RuleI(Pets, PetTauntRange) * RuleI(Pets, PetTauntRange))
|
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);
|
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 ||
|
level_difference < 0 ||
|
||||||
who->GetSpecialAbility(SpecialAbility::TauntImmunity)
|
who->GetSpecialAbility(SpecialAbility::TauntImmunity)
|
||||||
) {
|
) {
|
||||||
MessageString(Chat::SpellFailure, FAILED_TAUNT);
|
MessageString(Chat::SpellFailure, ClientString::FAILED_TAUNT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2368,10 +2368,10 @@ void Mob::Taunt(NPC *who, bool always_succeed, int chance_bonus, bool from_spell
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (who->CanTalk()) {
|
if (who->CanTalk()) {
|
||||||
who->SayString(SUCCESSFUL_TAUNT, GetCleanName());
|
who->SayString(ClientString::SUCCESSFUL_TAUNT, GetCleanName());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Skills, FAILED_TAUNT);
|
MessageString(Chat::Skills, ClientString::FAILED_TAUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modern Abilities
|
// Modern Abilities
|
||||||
@@ -2425,7 +2425,7 @@ void Mob::InstillDoubt(Mob *who) {
|
|||||||
success = true;
|
success = true;
|
||||||
//is there a success message?
|
//is there a success message?
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::LightBlue,NOT_SCARING);
|
MessageString(Chat::LightBlue, ClientString::NOT_SCARING);
|
||||||
//Idea from WR:
|
//Idea from WR:
|
||||||
/* if (target->IsNPC() && zone->random.Int(0,99) < 10 ) {
|
/* if (target->IsNPC() && zone->random.Int(0,99) < 10 ) {
|
||||||
entity_list.MessageClose(target, false, 50, Chat::NPCRampage, "%s lashes out in anger!",target->GetName());
|
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];
|
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) {
|
if (zone->random.Int(1, 1000) <= chance) {
|
||||||
entity_list.MessageCloseString(
|
entity_list.MessageCloseString(
|
||||||
this, false, 200, Chat::MeleeCrit, FATAL_BOW_SHOT,
|
this, false, 200, Chat::MeleeCrit, ClientString::FATAL_BOW_SHOT,
|
||||||
GetName());
|
GetName());
|
||||||
return HeadShot_Dmg;
|
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 (Assassinate_Dmg && Assassinate_Level && (defender->GetLevel() <= Assassinate_Level)) {
|
||||||
if (zone->random.Int(1, 1000) <= chance) {
|
if (zone->random.Int(1, 1000) <= chance) {
|
||||||
entity_list.MessageCloseString(
|
entity_list.MessageCloseString(
|
||||||
this, false, 200, Chat::MeleeCrit, ASSASSINATES,
|
this, false, 200, Chat::MeleeCrit, ClientString::ASSASSINATES,
|
||||||
GetName());
|
GetName());
|
||||||
return Assassinate_Dmg;
|
return Assassinate_Dmg;
|
||||||
}
|
}
|
||||||
|
|||||||
+57
-57
@@ -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(zone->random.Roll(RuleI(Spells, SuccorFailChance))) { //2% Fail chance by default
|
||||||
|
|
||||||
if(IsClient()) {
|
if(IsClient()) {
|
||||||
CastToClient()->MessageString(Chat::SpellFailure,SUCCOR_FAIL);
|
CastToClient()->MessageString(Chat::SpellFailure, ClientString::SUCCOR_FAIL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -752,7 +752,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
(caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))))
|
(caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))))
|
||||||
{
|
{
|
||||||
if (caster)
|
if (caster)
|
||||||
caster->MessageString(Chat::SpellFailure, IMMUNE_STUN);
|
caster->MessageString(Chat::SpellFailure, ClientString::IMMUNE_STUN);
|
||||||
} else {
|
} else {
|
||||||
int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
|
int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
|
||||||
if (IsClient() || IsBot()) {
|
if (IsClient() || IsBot()) {
|
||||||
@@ -769,7 +769,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
Stun(effect_value);
|
Stun(effect_value);
|
||||||
} else {
|
} else {
|
||||||
if (IsClient())
|
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);
|
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;
|
uint8 bt = BodyType::Undead;
|
||||||
|
|
||||||
int MessageID = SENSE_UNDEAD;
|
int MessageID = ClientString::SENSE_UNDEAD;
|
||||||
|
|
||||||
if(effect == SpellEffect::SenseSummoned)
|
if(effect == SpellEffect::SenseSummoned)
|
||||||
{
|
{
|
||||||
bt = BodyType::Summoned;
|
bt = BodyType::Summoned;
|
||||||
MessageID = SENSE_SUMMONED;
|
MessageID = ClientString::SENSE_SUMMONED;
|
||||||
}
|
}
|
||||||
else if(effect == SpellEffect::SenseAnimals)
|
else if(effect == SpellEffect::SenseAnimals)
|
||||||
{
|
{
|
||||||
bt = BodyType::Animal;
|
bt = BodyType::Animal;
|
||||||
MessageID = SENSE_ANIMAL;
|
MessageID = ClientString::SENSE_ANIMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mob *ClosestMob = entity_list.GetClosestMobByBodyType(this, bt, true);
|
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);
|
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MessageString(Chat::Red, SENSE_NOTHING);
|
MessageString(Chat::Red, ClientString::SENSE_NOTHING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -989,13 +989,13 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
} else {
|
} else {
|
||||||
if (!zone->CanBind()) {
|
if (!zone->CanBind()) {
|
||||||
MessageString(Chat::SpellFailure, CANNOT_BIND);
|
MessageString(Chat::SpellFailure, ClientString::CANNOT_BIND);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!zone->IsCity()) {
|
if (!zone->IsCity()) {
|
||||||
if (caster != this && !zone->IsSpecialBindLocation(GetPosition())) {
|
if (caster != this && !zone->IsSpecialBindLocation(GetPosition())) {
|
||||||
MessageString(Chat::SpellFailure, CANNOT_BIND);
|
MessageString(Chat::SpellFailure, ClientString::CANNOT_BIND);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
auto action_packet = new EQApplicationPacket(
|
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))
|
if(zone->random.Roll(effect_value))
|
||||||
Gate(spells[spell_id].limit_value[i] - 1);
|
Gate(spells[spell_id].limit_value[i] - 1);
|
||||||
else if (caster)
|
else if (caster)
|
||||||
caster->MessageString(Chat::SpellFailure,GATE_FAIL);
|
caster->MessageString(Chat::SpellFailure, ClientString::GATE_FAIL);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1102,7 +1102,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
#endif
|
#endif
|
||||||
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
|
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
|
||||||
if (caster) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1118,7 +1118,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
#endif
|
#endif
|
||||||
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
|
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
|
||||||
if (caster)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -1149,7 +1149,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
#endif
|
#endif
|
||||||
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
|
if(GetSpecialAbility(SpecialAbility::DispellImmunity)){
|
||||||
if (caster)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1297,7 +1297,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
#endif
|
#endif
|
||||||
if(GetPet())
|
if(GetPet())
|
||||||
{
|
{
|
||||||
MessageString(Chat::Shout, ONLY_ONE_PET);
|
MessageString(Chat::Shout, ClientString::ONLY_ONE_PET);
|
||||||
}
|
}
|
||||||
else
|
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)))))
|
&& caster && (!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity)))))
|
||||||
{
|
{
|
||||||
if (caster)
|
if (caster)
|
||||||
caster->MessageString(Chat::Shout, IMMUNE_STUN);
|
caster->MessageString(Chat::Shout, ClientString::IMMUNE_STUN);
|
||||||
}
|
}
|
||||||
else
|
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]) {
|
if (zone->random.Int(0, 99) > spells[spell_id].base_value[i]) {
|
||||||
SetFeigned(false);
|
SetFeigned(false);
|
||||||
entity_list.MessageCloseString(this, false, 200, 10, STRING_FEIGNFAILED, GetName());
|
entity_list.MessageCloseString(this, false, 200, 10, ClientString::STRING_FEIGNFAILED, GetName());
|
||||||
} else {
|
} else {
|
||||||
SetFeigned(true);
|
SetFeigned(true);
|
||||||
}
|
}
|
||||||
@@ -1685,12 +1685,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
if(caster == this)
|
if(caster == this)
|
||||||
{
|
{
|
||||||
MessageString(Chat::Spells,
|
MessageString(Chat::Spells,
|
||||||
SENTINEL_TRIG_YOU);
|
ClientString::SENTINEL_TRIG_YOU);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
caster->MessageString(Chat::Spells,
|
caster->MessageString(Chat::Spells,
|
||||||
SENTINEL_TRIG_OTHER, GetCleanName());
|
ClientString::SENTINEL_TRIG_OTHER, GetCleanName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1837,26 +1837,26 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
Corpse *corpse = entity_list.GetCorpseByOwner(TargetClient);
|
Corpse *corpse = entity_list.GetCorpseByOwner(TargetClient);
|
||||||
if(corpse) {
|
if(corpse) {
|
||||||
if(TargetClient == CastToClient())
|
if(TargetClient == CastToClient())
|
||||||
MessageString(Chat::LightBlue, SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
|
MessageString(Chat::LightBlue, ClientString::SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
|
||||||
else
|
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);
|
corpse->Summon(CastToClient(), true, true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// No corpse found in the zone
|
// No corpse found in the zone
|
||||||
MessageString(Chat::LightBlue, CORPSE_CANT_SENSE);
|
MessageString(Chat::LightBlue, ClientString::CORPSE_CANT_SENSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (caster) {
|
else if (caster) {
|
||||||
char level[4];
|
char level[4];
|
||||||
ConvertArray(effect_value, level);
|
ConvertArray(effect_value, level);
|
||||||
caster->MessageString(Chat::SpellFailure,
|
caster->MessageString(Chat::SpellFailure,
|
||||||
SPELL_LEVEL_REQ, level);
|
ClientString::SPELL_LEVEL_REQ, level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
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);
|
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();
|
Group* group = client_target->GetGroup();
|
||||||
if (!group->IsGroupMember(caster)) {
|
if (!group->IsGroupMember(caster)) {
|
||||||
if (caster != this) {
|
if (caster != this) {
|
||||||
caster->MessageString(Chat::Red, SUMMON_ONLY_GROUP_CORPSE);
|
caster->MessageString(Chat::Red, ClientString::SUMMON_ONLY_GROUP_CORPSE);
|
||||||
break;
|
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());
|
uint32 group_id = raid->GetGroup(caster->GetName());
|
||||||
if (group_id > 0 && group_id < MAX_RAID_GROUPS) {
|
if (group_id > 0 && group_id < MAX_RAID_GROUPS) {
|
||||||
if (client_target && raid->GetGroup(client_target->GetName()) != group_id) {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (caster != this) {
|
if (caster != this) {
|
||||||
caster->MessageString(Chat::Red, SUMMON_ONLY_GROUP_CORPSE);
|
caster->MessageString(Chat::Red, ClientString::SUMMON_ONLY_GROUP_CORPSE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1904,12 +1904,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
if (caster == this) {
|
if (caster == this) {
|
||||||
Message(Chat::Spells, "Summoning your corpses.");
|
Message(Chat::Spells, "Summoning your corpses.");
|
||||||
} else {
|
} 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());
|
client_target->SummonAllCorpses(client_target->GetPosition());
|
||||||
}
|
}
|
||||||
} else {
|
} 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);
|
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 (IsClient()) {
|
||||||
if (caster->IsClient()) {
|
if (caster->IsClient()) {
|
||||||
if (!entity_list.IsInSameGroupOrRaidGroup(caster->CastToClient(), CastToClient())) {
|
if (!entity_list.IsInSameGroupOrRaidGroup(caster->CastToClient(), CastToClient())) {
|
||||||
caster->MessageString(Chat::SpellFailure, TARGET_GROUP_MEMBER);
|
caster->MessageString(Chat::SpellFailure, ClientString::TARGET_GROUP_MEMBER);
|
||||||
break;
|
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(),
|
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), caster->GetX(),
|
||||||
caster->GetY(), caster->GetZ(), caster->GetHeading(), 2,
|
caster->GetY(), caster->GetZ(), caster->GetHeading(), 2,
|
||||||
SummonPC);
|
SummonPC);
|
||||||
MessageString(Chat::Spells, PLAYER_SUMMONED);
|
MessageString(Chat::Spells, ClientString::PLAYER_SUMMONED);
|
||||||
} else {
|
} else {
|
||||||
caster->Message(Chat::Red, "This spell can only be cast on players.");
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MessageString(Chat::Skills, ESCAPE);
|
MessageString(Chat::Skills, ClientString::ESCAPE);
|
||||||
} else{
|
} else{
|
||||||
entity_list.RemoveFromTargets(caster);
|
entity_list.RemoveFromTargets(caster);
|
||||||
SetInvisible(Invisibility::Invisible);
|
SetInvisible(Invisibility::Invisible);
|
||||||
@@ -2938,7 +2938,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
case SpellEffect::MassGroupBuff:{
|
case SpellEffect::MassGroupBuff:{
|
||||||
|
|
||||||
SetMGB(true);
|
SetMGB(true);
|
||||||
MessageString(Chat::Disciplines, MGB_STRING);
|
MessageString(Chat::Disciplines, ClientString::MGB_STRING);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3068,12 +3068,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (IsNPC() && GetSpecialAbility(SpecialAbility::StunImmunity)) {
|
if (IsNPC() && GetSpecialAbility(SpecialAbility::StunImmunity)) {
|
||||||
caster->MessageString(Chat::SpellFailure, IMMUNE_STUN);
|
caster->MessageString(Chat::SpellFailure, ClientString::IMMUNE_STUN);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsNPC() && GetSpecialAbility(SpecialAbility::FearImmunity)) {
|
if (IsNPC() && GetSpecialAbility(SpecialAbility::FearImmunity)) {
|
||||||
caster->MessageString(Chat::SpellFailure, IMMUNE_FEAR);
|
caster->MessageString(Chat::SpellFailure, ClientString::IMMUNE_FEAR);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
int max_level = 0;
|
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]);
|
Stun(spells[spell_id].base_value[i]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
caster->MessageString(Chat::SpellFailure, FEAR_TOO_HIGH);
|
caster->MessageString(Chat::SpellFailure, ClientString::FEAR_TOO_HIGH);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4124,7 +4124,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
|||||||
case SpellEffect::InvisVsUndead2: {
|
case SpellEffect::InvisVsUndead2: {
|
||||||
if (!IsBardSong(buff.spellid)) {
|
if (!IsBardSong(buff.spellid)) {
|
||||||
if (buff.ticsremaining <= 3 && buff.ticsremaining > 1) {
|
if (buff.ticsremaining <= 3 && buff.ticsremaining > 1) {
|
||||||
MessageString(Chat::Spells, INVIS_BEGIN_BREAK);
|
MessageString(Chat::Spells, ClientString::INVIS_BEGIN_BREAK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -4643,7 +4643,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
|||||||
if(p->IsPet())
|
if(p->IsPet())
|
||||||
notify = p->GetOwner();
|
notify = p->GetOwner();
|
||||||
if(p) {
|
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());
|
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)) {
|
if ((rand_effectiveness && UsedItem) || (realTotal != 0 && UsedItem)) {
|
||||||
// there are a crap ton more of these, I was able to verify these ones though
|
// 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
|
// 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) {
|
switch (type) {
|
||||||
case focusSpellHaste:
|
case focusSpellHaste:
|
||||||
string_id = SHIMMERS_BRIEFLY;
|
string_id = ClientString::SHIMMERS_BRIEFLY;
|
||||||
break;
|
break;
|
||||||
case focusManaCost: // this might be GROWS_DIM for fail
|
case focusManaCost: // this might be GROWS_DIM for fail
|
||||||
string_id = FLICKERS_PALE_LIGHT;
|
string_id = ClientString::FLICKERS_PALE_LIGHT;
|
||||||
break;
|
break;
|
||||||
case focusSpellDuration:
|
case focusSpellDuration:
|
||||||
string_id = SPARKLES;
|
string_id = ClientString::SPARKLES;
|
||||||
break;
|
break;
|
||||||
case focusImprovedDamage:
|
case focusImprovedDamage:
|
||||||
case focusImprovedDamage2:
|
case focusImprovedDamage2:
|
||||||
if (realTotal)
|
if (realTotal)
|
||||||
string_id = ALIVE_WITH_POWER;
|
string_id = ClientString::ALIVE_WITH_POWER;
|
||||||
else
|
else
|
||||||
string_id = SEEMS_DRAINED;
|
string_id = ClientString::SEEMS_DRAINED;
|
||||||
break;
|
break;
|
||||||
case focusRange:
|
case focusRange:
|
||||||
string_id = PULSES_WITH_LIGHT;
|
string_id = ClientString::PULSES_WITH_LIGHT;
|
||||||
break;
|
break;
|
||||||
case focusSpellHateMod: // GLOWS_RED for increasing hate
|
case focusSpellHateMod: // GLOWS_RED for increasing hate
|
||||||
string_id = GLOWS_BLUE;
|
string_id = ClientString::GLOWS_BLUE;
|
||||||
break;
|
break;
|
||||||
case focusImprovedHeal:
|
case focusImprovedHeal:
|
||||||
if (realTotal)
|
if (realTotal)
|
||||||
string_id = FEEDS_WITH_POWER;
|
string_id = ClientString::FEEDS_WITH_POWER;
|
||||||
else
|
else
|
||||||
string_id = POWER_DRAIN_INTO;
|
string_id = ClientString::POWER_DRAIN_INTO;
|
||||||
break;
|
break;
|
||||||
case focusReagentCost: // this might be GROWS_DIM for fail as well ...
|
case focusReagentCost: // this might be GROWS_DIM for fail as well ...
|
||||||
string_id = BEGINS_TO_SHINE;
|
string_id = ClientString::BEGINS_TO_SHINE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -7234,10 +7234,10 @@ bool Mob::TryDeathSave() {
|
|||||||
false,
|
false,
|
||||||
200,
|
200,
|
||||||
Chat::MeleeCrit,
|
Chat::MeleeCrit,
|
||||||
DIVINE_INTERVENTION,
|
ClientString::DIVINE_INTERVENTION,
|
||||||
GetCleanName());
|
GetCleanName());
|
||||||
} else {
|
} 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();
|
SendHPUpdate();
|
||||||
@@ -7276,10 +7276,10 @@ bool Mob::TryDeathSave() {
|
|||||||
false,
|
false,
|
||||||
200,
|
200,
|
||||||
Chat::MeleeCrit,
|
Chat::MeleeCrit,
|
||||||
DIVINE_INTERVENTION,
|
ClientString::DIVINE_INTERVENTION,
|
||||||
GetCleanName());
|
GetCleanName());
|
||||||
} else {
|
} 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();
|
SendHPUpdate();
|
||||||
@@ -9927,12 +9927,12 @@ void Client::BreakFeignDeathWhenCastOn(bool IsResisted)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(chance && (zone->random.Roll(chance))){
|
if(chance && (zone->random.Roll(chance))){
|
||||||
MessageString(Chat::SpellFailure,FD_CAST_ON_NO_BREAK);
|
MessageString(Chat::SpellFailure, ClientString::FD_CAST_ON_NO_BREAK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFeigned(false);
|
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()) {
|
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.");
|
LogSpells("Spell casting canceled: Can not cast charm on a client.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -9971,12 +9971,12 @@ bool Mob::PassCharmTargetRestriction(Mob *target) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (GetPet() && IsClient()) {
|
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.");
|
LogSpells("Spell casting canceled: Can not cast charm if you have a pet.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (target->GetOwner()) {
|
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.");
|
LogSpells("Spell casting canceled: Can not cast charm on a pet.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+111
-111
@@ -235,7 +235,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
|||||||
GetTarget()->GetMana() == 0
|
GetTarget()->GetMana() == 0
|
||||||
);
|
);
|
||||||
if (melee_block || caster_block) {
|
if (melee_block || caster_block) {
|
||||||
InterruptSpell(TARGET_NO_MANA, 0x121, spell_id);
|
InterruptSpell(ClientString::TARGET_NO_MANA, 0x121, spell_id);
|
||||||
return false;
|
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,
|
// note that CheckFizzle itself doesn't let NPCs fizzle,
|
||||||
// but this code allows for it.
|
// but this code allows for it.
|
||||||
if (slot < CastingSlot::MaxGems && !CheckFizzle(spell_id)) {
|
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);
|
uint32 use_mana = ((spells[spell_id].mana) / 4);
|
||||||
LogSpells("Spell casting canceled: fizzled. [{}] mana has been consumed", use_mana);
|
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),
|
RuleI(Range, SpellMessages),
|
||||||
Chat::SpellFailure,
|
Chat::SpellFailure,
|
||||||
(IsClient() ? FilterPCSpells : FilterNPCSpells),
|
(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,
|
0,
|
||||||
/*
|
/*
|
||||||
MessageFormat: You miss a note, bringing your song to a close! (if missed note)
|
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);
|
LogSpells("Spell Error: no target. spell=[{}]", spell_id);
|
||||||
if(IsClient()) {
|
if(IsClient()) {
|
||||||
//clients produce messages... npcs should not for this case
|
//clients produce messages... npcs should not for this case
|
||||||
MessageString(Chat::Red, SPELL_NEED_TAR);
|
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
|
||||||
InterruptSpell();
|
InterruptSpell();
|
||||||
} else {
|
} else {
|
||||||
InterruptSpell(0, 0, 0); //the 0 args should cause no messages
|
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) {
|
if (RuleB(Spells, UseItemCastMessage) && IsClient() && slot == CastingSlot::Item && item_slot != 0xFFFFFFFF) {
|
||||||
auto item = CastToClient()->GetInv().GetItem(item_slot);
|
auto item = CastToClient()->GetInv().GetItem(item_slot);
|
||||||
if (item && item->GetItem()) {
|
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);
|
LogSpells("Not enough mana spell [{}] curmana [{}] cost [{}]\n", spell_id, my_curmana, mana_cost);
|
||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
//clients produce messages... npcs should not for this case
|
//clients produce messages... npcs should not for this case
|
||||||
MessageString(Chat::Red, INSUFFICIENT_MANA);
|
MessageString(Chat::Red, ClientString::INSUFFICIENT_MANA);
|
||||||
InterruptSpell();
|
InterruptSpell();
|
||||||
} else {
|
} else {
|
||||||
InterruptSpell(0, 0, 0); //the 0 args should cause no messages
|
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
|
Can not cast if spell
|
||||||
*/
|
*/
|
||||||
if ((IsSilenced() && !IsDiscipline(spell_id))) {
|
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);
|
LogSpells("Spell casting canceled [{}] : can not cast spell when silenced.", spell_id);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -569,7 +569,7 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
|
|||||||
Can not cast if discipline.
|
Can not cast if discipline.
|
||||||
*/
|
*/
|
||||||
if (IsAmnesiad() && IsDiscipline(spell_id)) {
|
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);
|
LogSpells("Spell casting canceled [{}] : can not use discipline with amnesia.", spell_id);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -607,10 +607,10 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
|
|||||||
if (IsBeneficialSpell(spell_id)) {
|
if (IsBeneficialSpell(spell_id)) {
|
||||||
if ((IsNPC() && IsEngaged()) || (IsClient() && CastToClient()->GetAggroCount())) {
|
if ((IsNPC() && IsEngaged()) || (IsClient() && CastToClient()->GetAggroCount())) {
|
||||||
if (IsDiscipline(spell_id)) {
|
if (IsDiscipline(spell_id)) {
|
||||||
MessageString(Chat::Red, NO_ABILITY_IN_COMBAT);
|
MessageString(Chat::Red, ClientString::NO_ABILITY_IN_COMBAT);
|
||||||
}
|
}
|
||||||
else {
|
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);
|
LogSpells("Spell casting canceled [{}] : can not use spell while in combat.", spell_id);
|
||||||
return false;
|
return false;
|
||||||
@@ -621,10 +621,10 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
|
|||||||
if (IsBeneficialSpell(spell_id)) {
|
if (IsBeneficialSpell(spell_id)) {
|
||||||
if ((IsNPC() && !IsEngaged()) || (IsClient() && !CastToClient()->GetAggroCount())) {
|
if ((IsNPC() && !IsEngaged()) || (IsClient() && !CastToClient()->GetAggroCount())) {
|
||||||
if (IsDiscipline(spell_id)) {
|
if (IsDiscipline(spell_id)) {
|
||||||
MessageString(Chat::Red, NO_ABILITY_OUT_OF_COMBAT);
|
MessageString(Chat::Red, ClientString::NO_ABILITY_OUT_OF_COMBAT);
|
||||||
}
|
}
|
||||||
else {
|
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);
|
LogSpells("Spell casting canceled [{}] : can not use spell while out of combat.", spell_id);
|
||||||
return false;
|
return false;
|
||||||
@@ -637,7 +637,7 @@ bool Mob::DoCastingChecksOnCaster(int32 spell_id, CastingSlot slot) {
|
|||||||
if (IsClient() && !IsDiscipline(spell_id)) {
|
if (IsClient() && !IsDiscipline(spell_id)) {
|
||||||
int chance = CastToClient()->GetFocusEffect(focusFcMute, spell_id);//client only
|
int chance = CastToClient()->GetFocusEffect(focusFcMute, spell_id);//client only
|
||||||
if (chance && zone->random.Roll(chance)) {
|
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.");
|
LogSpells("Spell casting canceled: can not cast spell when silenced from SPA 357 FcMute.");
|
||||||
return(false);
|
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(); },
|
[&]() { 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; }
|
if (gm_bypass_message("spell daytime restrictions")) { return true; }
|
||||||
MessageString(Chat::Red, CAST_DAYTIME);
|
MessageString(Chat::Red, ClientString::CAST_DAYTIME);
|
||||||
return false;
|
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(); },
|
[&]() { 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;
|
if (gm_bypass_message("spell nighttime restrictions")) return true;
|
||||||
MessageString(Chat::Red, CAST_NIGHTTIME);
|
MessageString(Chat::Red, ClientString::CAST_NIGHTTIME);
|
||||||
return false;
|
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(); },
|
[&]() { return check_on_casting && !bypass_casting_restrictions && spells[spell_id].zone_type == 1 && !zone->CanCastOutdoor(); },
|
||||||
[&]() {
|
[&]() {
|
||||||
if (gm_bypass_message("zone outdoor restrictions")) return true;
|
if (gm_bypass_message("zone outdoor restrictions")) return true;
|
||||||
MessageString(Chat::Red, CAST_OUTDOORS);
|
MessageString(Chat::Red, ClientString::CAST_OUTDOORS);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -812,7 +812,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
|
|||||||
if (IsDetrimentalSpell(spell_id)) {
|
if (IsDetrimentalSpell(spell_id)) {
|
||||||
if (((spell_target->IsNPC() && spell_target->IsEngaged()) ||
|
if (((spell_target->IsNPC() && spell_target->IsEngaged()) ||
|
||||||
(spell_target->IsClient() && spell_target->CastToClient()->GetAggroCount()))) {
|
(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);
|
LogSpells("Spell casting canceled [{}] : can not use spell while your target is in combat.", spell_id);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -822,7 +822,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
|
|||||||
if (IsDetrimentalSpell(spell_id)) {
|
if (IsDetrimentalSpell(spell_id)) {
|
||||||
if (((spell_target->IsNPC() && !spell_target->IsEngaged()) ||
|
if (((spell_target->IsNPC() && !spell_target->IsEngaged()) ||
|
||||||
(spell_target->IsClient() && !spell_target->CastToClient()->GetAggroCount()))) {
|
(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);
|
LogSpells("Spell casting canceled [{}] : can not use spell while your target is out of combat.", spell_id);
|
||||||
return false;
|
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)) {
|
if (this == spell_target && IsLifetapSpell(spell_id)) {
|
||||||
LogSpells("You cannot lifetap yourself");
|
LogSpells("You cannot lifetap yourself");
|
||||||
MessageString(Chat::SpellFailure, CANT_DRAIN_SELF);
|
MessageString(Chat::SpellFailure, ClientString::CANT_DRAIN_SELF);
|
||||||
return false;
|
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)) {
|
if (this == spell_target && IsSacrificeSpell(spell_id)) {
|
||||||
LogSpells("You cannot sacrifice yourself");
|
LogSpells("You cannot sacrifice yourself");
|
||||||
MessageString(Chat::SpellFailure, CANNOT_SAC_SELF);
|
MessageString(Chat::SpellFailure, ClientString::CANNOT_SAC_SELF);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
Max level of target for harmony to take hold
|
Max level of target for harmony to take hold
|
||||||
*/
|
*/
|
||||||
if (IsClient() && IsHarmonySpell(spell_id) && !HarmonySpellLevelCheck(spell_id, spell_target)) {
|
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);
|
LogSpells("Spell casting canceled [{}] : can not use harmony on this target.", spell_id);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -926,7 +926,7 @@ bool Mob::DoCastingChecksOnTarget(bool check_on_casting, int32 spell_id, Mob *sp
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cast_failed) {
|
if (cast_failed) {
|
||||||
MessageString(Chat::Red, TARGET_GROUP_MEMBER);
|
MessageString(Chat::Red, ClientString::TARGET_GROUP_MEMBER);
|
||||||
return false;
|
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
|
if (GetRawSkill(EQ::skills::SkillPercussionInstruments) > 0) // no skill increases if not trained in the instrument
|
||||||
CheckIncreaseSkill(EQ::skills::SkillPercussionInstruments, nullptr, -15);
|
CheckIncreaseSkill(EQ::skills::SkillPercussionInstruments, nullptr, -15);
|
||||||
else
|
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
|
else
|
||||||
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
|
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
|
||||||
@@ -1017,7 +1017,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
|
|||||||
if (GetRawSkill(EQ::skills::SkillStringedInstruments) > 0)
|
if (GetRawSkill(EQ::skills::SkillStringedInstruments) > 0)
|
||||||
CheckIncreaseSkill(EQ::skills::SkillStringedInstruments, nullptr, -15);
|
CheckIncreaseSkill(EQ::skills::SkillStringedInstruments, nullptr, -15);
|
||||||
else
|
else
|
||||||
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
|
MessageString(Chat::Red, ClientString::NO_INSTRUMENT_SKILL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
|
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
|
||||||
@@ -1027,7 +1027,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
|
|||||||
if (GetRawSkill(EQ::skills::SkillWindInstruments) > 0)
|
if (GetRawSkill(EQ::skills::SkillWindInstruments) > 0)
|
||||||
CheckIncreaseSkill(EQ::skills::SkillWindInstruments, nullptr, -15);
|
CheckIncreaseSkill(EQ::skills::SkillWindInstruments, nullptr, -15);
|
||||||
else
|
else
|
||||||
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
|
MessageString(Chat::Red, ClientString::NO_INSTRUMENT_SKILL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
|
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
|
||||||
@@ -1037,7 +1037,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
|
|||||||
if (GetRawSkill(EQ::skills::SkillBrassInstruments) > 0)
|
if (GetRawSkill(EQ::skills::SkillBrassInstruments) > 0)
|
||||||
CheckIncreaseSkill(EQ::skills::SkillBrassInstruments, nullptr, -15);
|
CheckIncreaseSkill(EQ::skills::SkillBrassInstruments, nullptr, -15);
|
||||||
else
|
else
|
||||||
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
|
MessageString(Chat::Red, ClientString::NO_INSTRUMENT_SKILL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CheckIncreaseSkill(EQ::skills::SkillSinging, nullptr, -15);
|
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
|
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);
|
CastToClient()->ResetAlternateAdvancementTimer(casting_spell_aa_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1310,10 +1310,10 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!message)
|
if(!message)
|
||||||
message = IsBardSong(spellid) ? SONG_ENDS_ABRUPTLY : INTERRUPT_SPELL;
|
message = IsBardSong(spellid) ? ClientString::SONG_ENDS_ABRUPTLY : ClientString::INTERRUPT_SPELL;
|
||||||
|
|
||||||
// clients need some packets
|
// clients need some packets
|
||||||
if (IsClient() && message != SONG_ENDS)
|
if (IsClient() && message != ClientString::SONG_ENDS)
|
||||||
{
|
{
|
||||||
// the interrupt message
|
// the interrupt message
|
||||||
outapp = new EQApplicationPacket(OP_InterruptCast, sizeof(InterruptCast_Struct));
|
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
|
// first figure out what message others should get
|
||||||
switch(message)
|
switch(message)
|
||||||
{
|
{
|
||||||
case SONG_ENDS:
|
case ClientString::SONG_ENDS:
|
||||||
message_other = SONG_ENDS_OTHER;
|
message_other = ClientString::SONG_ENDS_OTHER;
|
||||||
break;
|
break;
|
||||||
case SONG_ENDS_ABRUPTLY:
|
case ClientString::SONG_ENDS_ABRUPTLY:
|
||||||
message_other = SONG_ENDS_ABRUPTLY_OTHER;
|
message_other = ClientString::SONG_ENDS_ABRUPTLY_OTHER;
|
||||||
break;
|
break;
|
||||||
case MISS_NOTE:
|
case ClientString::MISS_NOTE:
|
||||||
message_other = MISSED_NOTE_OTHER;
|
message_other = ClientString::MISSED_NOTE_OTHER;
|
||||||
break;
|
break;
|
||||||
case SPELL_FIZZLE:
|
case ClientString::SPELL_FIZZLE:
|
||||||
message_other = SPELL_FIZZLE_OTHER;
|
message_other = ClientString::SPELL_FIZZLE_OTHER;
|
||||||
break;
|
break;
|
||||||
default:
|
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
|
// this is the actual message, it works the same as a formatted message
|
||||||
@@ -1370,7 +1370,7 @@ void Mob::StopCasting()
|
|||||||
if (IsClient()) {
|
if (IsClient()) {
|
||||||
auto c = CastToClient();
|
auto c = CastToClient();
|
||||||
if (casting_spell_aa_id) { //Rest AA Timer on failed cast
|
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);
|
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(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)) {
|
if(!CastToClient()->GetPTimers().Expired(&database, pTimerSpellStart + spell_id, false)) {
|
||||||
//should we issue a message or send them a spell gem packet?
|
//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);
|
LogSpells("Casting of [{}] canceled: spell reuse timer not expired", spell_id);
|
||||||
StopCasting();
|
StopCasting();
|
||||||
return;
|
return;
|
||||||
@@ -1447,7 +1447,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
IsFromItem = true;
|
IsFromItem = true;
|
||||||
item = CastToClient()->GetInv().GetItem(inventory_slot); //checked for in reagents and charges.
|
item = CastToClient()->GetInv().GetItem(inventory_slot); //checked for in reagents and charges.
|
||||||
if (CastToClient()->HasItemRecastTimer(spell_id, inventory_slot)) {
|
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);
|
LogSpells("Casting of [{}] canceled: item or augment spell reuse timer not expired", spell_id);
|
||||||
StopCasting();
|
StopCasting();
|
||||||
return;
|
return;
|
||||||
@@ -1471,7 +1471,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
if (casting_spell_id != spell_id)
|
if (casting_spell_id != spell_id)
|
||||||
{
|
{
|
||||||
LogSpells("Casting of [{}] canceled: already casting", spell_id);
|
LogSpells("Casting of [{}] canceled: already casting", spell_id);
|
||||||
MessageString(Chat::Red,ALREADY_CASTING);
|
MessageString(Chat::Red, ClientString::ALREADY_CASTING);
|
||||||
InterruptSpell();
|
InterruptSpell();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1572,13 +1572,13 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
}
|
}
|
||||||
// if we got here, we regained concentration
|
// if we got here, we regained concentration
|
||||||
regain_conc = true;
|
regain_conc = true;
|
||||||
MessageString(Chat::Spells, REGAIN_AND_CONTINUE);
|
MessageString(Chat::Spells, ClientString::REGAIN_AND_CONTINUE);
|
||||||
entity_list.MessageCloseString(
|
entity_list.MessageCloseString(
|
||||||
this,
|
this,
|
||||||
true,
|
true,
|
||||||
RuleI(Range, SpellMessages),
|
RuleI(Range, SpellMessages),
|
||||||
Chat::Spells,
|
Chat::Spells,
|
||||||
OTHER_REGAIN_CAST,
|
ClientString::OTHER_REGAIN_CAST,
|
||||||
GetCleanName());
|
GetCleanName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1621,7 +1621,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
case INSTRUMENT_HAND_DRUM:
|
case INSTRUMENT_HAND_DRUM:
|
||||||
if(itembonuses.percussionMod == 0) { // check for the appropriate instrument type
|
if(itembonuses.percussionMod == 0) { // check for the appropriate instrument type
|
||||||
HasInstrument = false;
|
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;
|
break;
|
||||||
|
|
||||||
@@ -1629,7 +1629,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
case INSTRUMENT_WOODEN_FLUTE:
|
case INSTRUMENT_WOODEN_FLUTE:
|
||||||
if(itembonuses.windMod == 0) {
|
if(itembonuses.windMod == 0) {
|
||||||
HasInstrument = false;
|
HasInstrument = false;
|
||||||
c->MessageString(Chat::Red, SONG_NEEDS_WIND);
|
c->MessageString(Chat::Red, ClientString::SONG_NEEDS_WIND);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1637,7 +1637,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
case INSTRUMENT_LUTE:
|
case INSTRUMENT_LUTE:
|
||||||
if(itembonuses.stringedMod == 0) {
|
if(itembonuses.stringedMod == 0) {
|
||||||
HasInstrument = false;
|
HasInstrument = false;
|
||||||
c->MessageString(Chat::Red, SONG_NEEDS_STRINGS);
|
c->MessageString(Chat::Red, ClientString::SONG_NEEDS_STRINGS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1645,7 +1645,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
case INSTRUMENT_HORN:
|
case INSTRUMENT_HORN:
|
||||||
if(itembonuses.brassMod == 0) {
|
if(itembonuses.brassMod == 0) {
|
||||||
HasInstrument = false;
|
HasInstrument = false;
|
||||||
c->MessageString(Chat::Red, SONG_NEEDS_BRASS);
|
c->MessageString(Chat::Red, ClientString::SONG_NEEDS_BRASS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1677,13 +1677,13 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
|||||||
{
|
{
|
||||||
if (!missingreags)
|
if (!missingreags)
|
||||||
{
|
{
|
||||||
c->MessageString(Chat::Red, MISSING_SPELL_COMP);
|
c->MessageString(Chat::Red, ClientString::MISSING_SPELL_COMP);
|
||||||
missingreags=true;
|
missingreags=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EQ::ItemData *item = database.GetItem(component);
|
const EQ::ItemData *item = database.GetItem(component);
|
||||||
if(item) {
|
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);
|
LogSpells("Spell [{}]: Canceled. Missing required reagent [{}] ([{}])", spell_id, item->Name, component);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1938,7 +1938,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
if (!spell_target)
|
if (!spell_target)
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
|
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
|
return false; // can't cast these unless we have a target
|
||||||
}
|
}
|
||||||
CastAction = SingleTarget;
|
CastAction = SingleTarget;
|
||||||
@@ -1957,9 +1957,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
//invalid target
|
//invalid target
|
||||||
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (undead)", spell_id, mob_body);
|
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (undead)", spell_id, mob_body);
|
||||||
if(!spell_target)
|
if(!spell_target)
|
||||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
|
||||||
else
|
else
|
||||||
MessageString(Chat::Red,CANNOT_AFFECT_NPC);
|
MessageString(Chat::Red, ClientString::CANNOT_AFFECT_NPC);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CastAction = SingleTarget;
|
CastAction = SingleTarget;
|
||||||
@@ -1971,7 +1971,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
{
|
{
|
||||||
//invalid target
|
//invalid target
|
||||||
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (summoned)", spell_id, mob_body);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
CastAction = SingleTarget;
|
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)",
|
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (summoned pet)",
|
||||||
spell_id, mob_body);
|
spell_id, mob_body);
|
||||||
|
|
||||||
MessageString(Chat::Red, SPELL_NEED_TAR);
|
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2010,9 +2010,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
//invalid target
|
//invalid target
|
||||||
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (want body Type [{}])", spell_id, mob_body, target_bt);
|
LogSpells("Spell [{}] canceled: invalid target of body type [{}] (want body Type [{}])", spell_id, mob_body, target_bt);
|
||||||
if(!spell_target)
|
if(!spell_target)
|
||||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
|
||||||
else
|
else
|
||||||
MessageString(Chat::Red,CANNOT_AFFECT_NPC);
|
MessageString(Chat::Red, ClientString::CANNOT_AFFECT_NPC);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CastAction = SingleTarget;
|
CastAction = SingleTarget;
|
||||||
@@ -2027,7 +2027,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
if(!spell_target)
|
if(!spell_target)
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: invalid target (ldon object)", spell_id);
|
LogSpells("Spell [{}] canceled: invalid target (ldon object)", spell_id);
|
||||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2035,14 +2035,14 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
if(!spell_target->IsNPC())
|
if(!spell_target->IsNPC())
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
|
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
|
||||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(spell_target->GetClass() != Class::LDoNTreasure)
|
if(spell_target->GetClass() != Class::LDoNTreasure)
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
|
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
|
||||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2051,7 +2051,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
if(!spell_target)
|
if(!spell_target)
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: invalid target (normal)", spell_id);
|
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
|
return false; // can't cast these unless we have a target
|
||||||
}
|
}
|
||||||
CastAction = SingleTarget;
|
CastAction = SingleTarget;
|
||||||
@@ -2063,10 +2063,10 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
if(!spell_target || !spell_target->IsPlayerCorpse())
|
if(!spell_target || !spell_target->IsPlayerCorpse())
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: invalid target (corpse)", spell_id);
|
LogSpells("Spell [{}] canceled: invalid target (corpse)", spell_id);
|
||||||
uint32 message = ONLY_ON_CORPSES;
|
uint32 message = ClientString::ONLY_ON_CORPSES;
|
||||||
if(!spell_target) message = SPELL_NEED_TAR;
|
if(!spell_target) message = ClientString::SPELL_NEED_TAR;
|
||||||
else if(!spell_target->IsCorpse()) message = ONLY_ON_CORPSES;
|
else if(!spell_target->IsCorpse()) message = ClientString::ONLY_ON_CORPSES;
|
||||||
else if(!spell_target->IsPlayerCorpse()) message = CORPSE_NOT_VALID;
|
else if(!spell_target->IsPlayerCorpse()) message = ClientString::CORPSE_NOT_VALID;
|
||||||
MessageString(Chat::Red, message);
|
MessageString(Chat::Red, message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2086,7 +2086,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
|
|
||||||
if (!spell_target) {
|
if (!spell_target) {
|
||||||
LogSpells("Spell [{}] canceled: invalid target (no pet)", spell_id);
|
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
|
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)
|
if(!spell_target)
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: invalid target (AOE)", spell_id);
|
LogSpells("Spell [{}] canceled: invalid target (AOE)", spell_id);
|
||||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
MessageString(Chat::Red, ClientString::SPELL_NEED_TAR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ae_center = spell_target;
|
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) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2202,7 +2202,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
if(!spell_target)
|
if(!spell_target)
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: invalid target (Group Required: Single Target)", spell_id);
|
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;
|
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)
|
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);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(group_id_caster != group_id_target)
|
if(group_id_caster != group_id_target)
|
||||||
{
|
{
|
||||||
LogSpells("Spell [{}] canceled: Attempted to cast a Single Target Group spell on a ungrouped member", spell_id);
|
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;
|
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)
|
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());
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2535,13 +2535,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
|||||||
if(dist2 > range2) {
|
if(dist2 > range2) {
|
||||||
//target is out of range.
|
//target is out of range.
|
||||||
LogSpells("Spell [{}]: Spell target is out of range (squared: [{}] > [{}])", spell_id, dist2, range2);
|
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);
|
return(false);
|
||||||
}
|
}
|
||||||
else if (dist2 < min_range2){
|
else if (dist2 < min_range2){
|
||||||
//target is too close range.
|
//target is too close range.
|
||||||
LogSpells("Spell [{}]: Spell target is too close (squared: [{}] < [{}])", spell_id, dist2, min_range2);
|
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);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2556,13 +2556,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in
|
|||||||
if(dist2 > range2) {
|
if(dist2 > range2) {
|
||||||
//target is out of range.
|
//target is out of range.
|
||||||
LogSpells("Spell [{}]: Spell target is out of range (squared: [{}] > [{}])", spell_id, dist2, range2);
|
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);
|
return(false);
|
||||||
}
|
}
|
||||||
else if (dist2 < min_range2){
|
else if (dist2 < min_range2){
|
||||||
//target is too close range.
|
//target is too close range.
|
||||||
LogSpells("Spell [{}]: Spell target is too close (squared: [{}] < [{}])", spell_id, dist2, min_range2);
|
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);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3112,7 +3112,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
|||||||
if (spellid1 == 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.
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3182,7 +3182,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
|||||||
|
|
||||||
if (spellbonuses.Screech == 1) {
|
if (spellbonuses.Screech == 1) {
|
||||||
if (effect2 == SpellEffect::Screech && sp2.base_value[i] == -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;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3497,7 +3497,7 @@ bool Mob::CheckSpellLevelRestriction(Mob *caster, uint16 spell_id)
|
|||||||
if (!can_cast) {
|
if (!can_cast) {
|
||||||
LogSpells("Spell [{}] failed: recipient did not meet the level restrictions", spell_id);
|
LogSpells("Spell [{}] failed: recipient did not meet the level restrictions", spell_id);
|
||||||
if (!IsBardSong(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)
|
!IsEffectInSpell(spell_id, SpellEffect::BindSight)
|
||||||
) {
|
) {
|
||||||
if (!IsClient() || !CastToClient()->GetGM()) {
|
if (!IsClient() || !CastToClient()->GetGM()) {
|
||||||
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
|
MessageString(Chat::SpellFailure, ClientString::SPELL_NO_HOLD);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4153,7 +4153,7 @@ bool Mob::SpellOnTarget(
|
|||||||
if (!RuleB(Spells, AllowDoubleInvis) && !IsActiveBardSong(spell_id)) {
|
if (!RuleB(Spells, AllowDoubleInvis) && !IsActiveBardSong(spell_id)) {
|
||||||
if (IsEffectInSpell(spell_id, SpellEffect::Invisibility)) {
|
if (IsEffectInSpell(spell_id, SpellEffect::Invisibility)) {
|
||||||
if (spelltar->invisible) {
|
if (spelltar->invisible) {
|
||||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
spelltar->MessageString(Chat::SpellFailure, ClientString::ALREADY_INVIS, GetCleanName());
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4161,7 +4161,7 @@ bool Mob::SpellOnTarget(
|
|||||||
|
|
||||||
if (IsEffectInSpell(spell_id, SpellEffect::InvisVsUndead)) {
|
if (IsEffectInSpell(spell_id, SpellEffect::InvisVsUndead)) {
|
||||||
if (spelltar->invisible_undead) {
|
if (spelltar->invisible_undead) {
|
||||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
spelltar->MessageString(Chat::SpellFailure, ClientString::ALREADY_INVIS, GetCleanName());
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4169,7 +4169,7 @@ bool Mob::SpellOnTarget(
|
|||||||
|
|
||||||
if (IsEffectInSpell(spell_id, SpellEffect::InvisVsAnimals)) {
|
if (IsEffectInSpell(spell_id, SpellEffect::InvisVsAnimals)) {
|
||||||
if (spelltar->invisible_animals) {
|
if (spelltar->invisible_animals) {
|
||||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
spelltar->MessageString(Chat::SpellFailure, ClientString::ALREADY_INVIS, GetCleanName());
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4267,7 +4267,7 @@ bool Mob::SpellOnTarget(
|
|||||||
spelltar->GetName(),
|
spelltar->GetName(),
|
||||||
IsBeneficialAllowed(spelltar)
|
IsBeneficialAllowed(spelltar)
|
||||||
);
|
);
|
||||||
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
|
MessageString(Chat::SpellFailure, ClientString::SPELL_NO_HOLD);
|
||||||
}
|
}
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
@@ -4284,7 +4284,7 @@ bool Mob::SpellOnTarget(
|
|||||||
GetName(),
|
GetName(),
|
||||||
spelltar->GetName()
|
spelltar->GetName()
|
||||||
);
|
);
|
||||||
spelltar->MessageString(Chat::SpellFailure, YOU_ARE_PROTECTED, GetCleanName());
|
spelltar->MessageString(Chat::SpellFailure, ClientString::YOU_ARE_PROTECTED, GetCleanName());
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4324,7 +4324,7 @@ bool Mob::SpellOnTarget(
|
|||||||
IsHarmonySpell(spell_id) &&
|
IsHarmonySpell(spell_id) &&
|
||||||
!HarmonySpellLevelCheck(spell_id, spelltar)
|
!HarmonySpellLevelCheck(spell_id, spelltar)
|
||||||
) {
|
) {
|
||||||
MessageString(Chat::SpellFailure, SPELL_NO_EFFECT);
|
MessageString(Chat::SpellFailure, ClientString::SPELL_NO_EFFECT);
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4338,7 +4338,7 @@ bool Mob::SpellOnTarget(
|
|||||||
focus = CalcFocusEffect(focusBlockNextSpell, buffs[b].spellid, spell_id);
|
focus = CalcFocusEffect(focusBlockNextSpell, buffs[b].spellid, spell_id);
|
||||||
if (focus) {
|
if (focus) {
|
||||||
CheckNumHitsRemaining(NumHit::MatchingSpells, b);
|
CheckNumHitsRemaining(NumHit::MatchingSpells, b);
|
||||||
MessageString(Chat::SpellFailure, SPELL_WOULDNT_HOLD);
|
MessageString(Chat::SpellFailure, ClientString::SPELL_WOULDNT_HOLD);
|
||||||
safe_delete(action_packet);
|
safe_delete(action_packet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4441,12 +4441,12 @@ bool Mob::SpellOnTarget(
|
|||||||
false, /* Skip Sender */
|
false, /* Skip Sender */
|
||||||
RuleI(Range, SpellMessages), /* Range */
|
RuleI(Range, SpellMessages), /* Range */
|
||||||
Chat::Spells, /* Type */
|
Chat::Spells, /* Type */
|
||||||
SPELL_REFLECT, /* String ID */
|
ClientString::SPELL_REFLECT, /* String ID */
|
||||||
GetCleanName(), /* Message 1 */
|
GetCleanName(), /* Message 1 */
|
||||||
spelltar->GetCleanName() /* Message 2 */
|
spelltar->GetCleanName() /* Message 2 */
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::Spells, SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
|
MessageString(Chat::Spells, ClientString::SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckNumHitsRemaining(NumHit::ReflectSpell);
|
CheckNumHitsRemaining(NumHit::ReflectSpell);
|
||||||
@@ -4499,11 +4499,11 @@ bool Mob::SpellOnTarget(
|
|||||||
LogSpells("Spell [{}] was completely resisted by [{}]", spell_id, spelltar->GetName());
|
LogSpells("Spell [{}] was completely resisted by [{}]", spell_id, spelltar->GetName());
|
||||||
|
|
||||||
if (spells[spell_id].resist_type == RESIST_PHYSICAL){
|
if (spells[spell_id].resist_type == RESIST_PHYSICAL){
|
||||||
MessageString(Chat::SpellFailure, PHYSICAL_RESIST_FAIL,spells[spell_id].name);
|
MessageString(Chat::SpellFailure, ClientString::PHYSICAL_RESIST_FAIL,spells[spell_id].name);
|
||||||
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
|
spelltar->MessageString(Chat::SpellFailure, ClientString::YOU_RESIST, spells[spell_id].name);
|
||||||
} else {
|
} else {
|
||||||
MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
|
MessageString(Chat::SpellFailure, ClientString::TARGET_RESISTED, spells[spell_id].name);
|
||||||
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
|
spelltar->MessageString(Chat::SpellFailure, ClientString::YOU_RESIST, spells[spell_id].name);
|
||||||
|
|
||||||
if (IsBot() && RuleB(Bots, ShowResistMessagesToOwner)) {
|
if (IsBot() && RuleB(Bots, ShowResistMessagesToOwner)) {
|
||||||
CastToBot()->GetBotOwner()->Message
|
CastToBot()->GetBotOwner()->Message
|
||||||
@@ -4620,7 +4620,7 @@ bool Mob::SpellOnTarget(
|
|||||||
// spell. It's most likely a buff that can't stack.
|
// spell. It's most likely a buff that can't stack.
|
||||||
LogSpells("Spell [{}] could not apply its effects [{}] -> [{}]\n", spell_id, GetName(), spelltar->GetName());
|
LogSpells("Spell [{}] could not apply its effects [{}] -> [{}]\n", spell_id, GetName(), spelltar->GetName());
|
||||||
if (casting_spell_aa_id) {
|
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) {
|
if (RuleB(Spells, LegacyManaburn) && IsClient() && casting_spell_aa_id == aaManaBurn) {
|
||||||
StopCasting();
|
StopCasting();
|
||||||
}
|
}
|
||||||
@@ -5085,7 +5085,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
{
|
{
|
||||||
if(GetSpecialAbility(SpecialAbility::MesmerizeImmunity)) {
|
if(GetSpecialAbility(SpecialAbility::MesmerizeImmunity)) {
|
||||||
LogSpells("We are immune to Mez spells");
|
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);
|
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||||
if(aggro > 0) {
|
if(aggro > 0) {
|
||||||
AddToHateList(caster, aggro);
|
AddToHateList(caster, aggro);
|
||||||
@@ -5103,7 +5103,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
(!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))
|
(!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]);
|
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);
|
AddToHateList(caster, 1,0,true,false,false,spell_id);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -5113,7 +5113,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
if(GetSpecialAbility(SpecialAbility::SlowImmunity) && IsEffectInSpell(spell_id, SpellEffect::AttackSpeed))
|
if(GetSpecialAbility(SpecialAbility::SlowImmunity) && IsEffectInSpell(spell_id, SpellEffect::AttackSpeed))
|
||||||
{
|
{
|
||||||
LogSpells("We are immune to Slow spells");
|
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);
|
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||||
if(aggro > 0) {
|
if(aggro > 0) {
|
||||||
AddToHateList(caster, aggro);
|
AddToHateList(caster, aggro);
|
||||||
@@ -5129,7 +5129,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
effect_index = GetSpellEffectIndex(spell_id, SpellEffect::Fear);
|
effect_index = GetSpellEffectIndex(spell_id, SpellEffect::Fear);
|
||||||
if(GetSpecialAbility(SpecialAbility::FearImmunity)) {
|
if(GetSpecialAbility(SpecialAbility::FearImmunity)) {
|
||||||
LogSpells("We are immune to Fear spells");
|
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);
|
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||||
if(aggro > 0) {
|
if(aggro > 0) {
|
||||||
AddToHateList(caster, aggro);
|
AddToHateList(caster, aggro);
|
||||||
@@ -5140,13 +5140,13 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
} else if(IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false))
|
} else if(IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false))
|
||||||
{
|
{
|
||||||
LogSpells("Clients cannot fear eachother!");
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
else if(GetLevel() > spells[spell_id].max_value[effect_index] && spells[spell_id].max_value[effect_index] != 0)
|
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());
|
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);
|
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||||
if (aggro > 0) {
|
if (aggro > 0) {
|
||||||
AddToHateList(caster, aggro);
|
AddToHateList(caster, aggro);
|
||||||
@@ -5159,7 +5159,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
{
|
{
|
||||||
Message(Chat::Red, "Your are immune to fear.");
|
Message(Chat::Red, "Your are immune to fear.");
|
||||||
LogSpells("Clients has WarCry effect, 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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5169,7 +5169,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
if(GetSpecialAbility(SpecialAbility::CharmImmunity))
|
if(GetSpecialAbility(SpecialAbility::CharmImmunity))
|
||||||
{
|
{
|
||||||
LogSpells("We are immune to Charm spells");
|
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);
|
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||||
if(aggro > 0) {
|
if(aggro > 0) {
|
||||||
AddToHateList(caster, aggro);
|
AddToHateList(caster, aggro);
|
||||||
@@ -5198,11 +5198,11 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
if (RuleB(Spells, CharmAggroOverLevel)) {
|
if (RuleB(Spells, CharmAggroOverLevel)) {
|
||||||
int64 aggro = caster->CheckAggroAmount(spell_id, this);
|
int64 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||||
aggro > 0 ? AddToHateList(caster, aggro) : AddToHateList(caster, 1, 0, true, false, false, spell_id);
|
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;
|
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);
|
AddToHateList(caster, 1,0,true,false,false,spell_id);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -5217,7 +5217,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
{
|
{
|
||||||
if(GetSpecialAbility(SpecialAbility::SnareImmunity)) {
|
if(GetSpecialAbility(SpecialAbility::SnareImmunity)) {
|
||||||
LogSpells("We are immune to Snare spells");
|
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);
|
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||||
if(aggro > 0) {
|
if(aggro > 0) {
|
||||||
AddToHateList(caster, aggro);
|
AddToHateList(caster, aggro);
|
||||||
@@ -5233,7 +5233,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
if(this == caster)
|
if(this == caster)
|
||||||
{
|
{
|
||||||
LogSpells("You cannot lifetap yourself");
|
LogSpells("You cannot lifetap yourself");
|
||||||
caster->MessageString(Chat::SpellFailure, CANT_DRAIN_SELF);
|
caster->MessageString(Chat::SpellFailure, ClientString::CANT_DRAIN_SELF);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5243,7 +5243,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
|||||||
if(this == caster)
|
if(this == caster)
|
||||||
{
|
{
|
||||||
LogSpells("You cannot sacrifice yourself");
|
LogSpells("You cannot sacrifice yourself");
|
||||||
caster->MessageString(Chat::SpellFailure, CANNOT_SAC_SELF);
|
caster->MessageString(Chat::SpellFailure, ClientString::CANNOT_SAC_SELF);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7297,7 +7297,7 @@ void Mob::DoBardCastingFromItemClick(bool is_casting_bard_song, uint32 cast_time
|
|||||||
EQApplicationPacket *outapp = nullptr;
|
EQApplicationPacket *outapp = nullptr;
|
||||||
outapp = new EQApplicationPacket(OP_InterruptCast, sizeof(InterruptCast_Struct));
|
outapp = new EQApplicationPacket(OP_InterruptCast, sizeof(InterruptCast_Struct));
|
||||||
InterruptCast_Struct* ic = (InterruptCast_Struct*)outapp->pBuffer;
|
InterruptCast_Struct* ic = (InterruptCast_Struct*)outapp->pBuffer;
|
||||||
ic->messageid = SONG_ENDS;
|
ic->messageid = ClientString::SONG_ENDS;
|
||||||
ic->spawnid = GetID();
|
ic->spawnid = GetID();
|
||||||
outapp->priority = 5;
|
outapp->priority = 5;
|
||||||
CastToClient()->QueuePacket(outapp);
|
CastToClient()->QueuePacket(outapp);
|
||||||
@@ -7436,7 +7436,7 @@ bool Mob::CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot) {
|
|||||||
RecordPlayerEventLogWithClient(CastToClient(), PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
|
RecordPlayerEventLogWithClient(CastToClient(), PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MessageString(Chat::Red, MUST_EQUIP_ITEM);
|
MessageString(Chat::Red, ClientString::MUST_EQUIP_ITEM);
|
||||||
}
|
}
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
@@ -7458,7 +7458,7 @@ bool Mob::CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageString(Chat::Red, CANNOT_USE_ITEM);
|
MessageString(Chat::Red, ClientString::CANNOT_USE_ITEM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(false);
|
return(false);
|
||||||
@@ -7475,7 +7475,7 @@ bool Mob::CheckItemRaceClassDietyRestrictionsOnCast(uint32 inventory_slot) {
|
|||||||
RecordPlayerEventLogWithClient(CastToClient(), PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
|
RecordPlayerEventLogWithClient(CastToClient(), PlayerEvent::POSSIBLE_HACK, PlayerEvent::PossibleHackEvent{.message = message});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MessageString(Chat::Red, MUST_EQUIP_ITEM);
|
MessageString(Chat::Red, ClientString::MUST_EQUIP_ITEM);
|
||||||
}
|
}
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|||||||
+604
-598
File diff suppressed because it is too large
Load Diff
@@ -866,7 +866,7 @@ int ClientTaskState::IncrementDoneCount(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < msg_count; ++i) {
|
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);
|
LogTasks("task_complete is [{}]", task_complete);
|
||||||
// shared tasks only send update messages on activity completion
|
// shared tasks only send update messages on activity completion
|
||||||
if (task_data->type == TaskType::Shared) {
|
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
|
// and by the 'Task Stage Completed' message
|
||||||
client->SendTaskActivityComplete(info->task_id, activity_id, task_index, task_data->type);
|
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);
|
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->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) {
|
if (max_tasks) {
|
||||||
client->MessageString(Chat::Yellow, MAX_ACTIVE_TASKS, ".", ".", client->GetName());
|
client->MessageString(Chat::Yellow, ClientString::MAX_ACTIVE_TASKS, ".", ".", client->GetName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2057,7 +2057,7 @@ void ClientTaskState::AcceptNewTask(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (enforce_level_requirement && !TaskManager::Instance()->ValidateLevel(task_id, client->GetLevel())) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2140,7 +2140,7 @@ void ClientTaskState::AcceptNewTask(
|
|||||||
|
|
||||||
// This shouldn't happen unless there is a bug in the handling of ActiveTaskCount somewhere
|
// This shouldn't happen unless there is a bug in the handling of ActiveTaskCount somewhere
|
||||||
if (active_slot == nullptr) {
|
if (active_slot == nullptr) {
|
||||||
client->MessageString(Chat::Yellow, MAX_ACTIVE_TASKS, ".", ".", client->GetName());
|
client->MessageString(Chat::Yellow, ClientString::MAX_ACTIVE_TASKS, ".", ".", client->GetName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2194,7 +2194,7 @@ void ClientTaskState::AcceptNewTask(
|
|||||||
|
|
||||||
TaskManager::Instance()->SendSingleActiveTaskToClient(client, *active_slot, false, true);
|
TaskManager::Instance()->SendSingleActiveTaskToClient(client, *active_slot, false, true);
|
||||||
client->StartTaskRequestCooldownTimer();
|
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);
|
TaskManager::Instance()->SaveClientState(client, this);
|
||||||
|
|
||||||
|
|||||||
@@ -594,7 +594,7 @@ void TaskManager::TaskSetSelector(Client* client, Mob* mob, int task_set_id, boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_task_sets[task_set_id].empty()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -632,7 +632,7 @@ void TaskManager::TaskSetSelector(Client* client, Mob* mob, int task_set_id, boo
|
|||||||
SendTaskSelector(client, mob, task_list);
|
SendTaskSelector(client, mob, task_list);
|
||||||
}
|
}
|
||||||
else {
|
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);
|
SendTaskSelector(client, mob, task_list);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
client->MessageString(Chat::Yellow, NO_TASK_OFFERS, ".", ".", client->GetName());
|
client->MessageString(Chat::Yellow, ClientString::NO_TASK_OFFERS, ".", ".", client->GetName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -136,7 +136,7 @@ void Client::SendTaskRequestCooldownTimerMessage()
|
|||||||
if (HasTaskRequestCooldownTimer())
|
if (HasTaskRequestCooldownTimer())
|
||||||
{
|
{
|
||||||
uint32_t seconds = task_request_timer.GetRemainingTime() / 1000;
|
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
|
".", ".", // args start at %3 for this eqstr
|
||||||
GetName(),
|
GetName(),
|
||||||
fmt::format_int(seconds / 60).c_str(), // minutes
|
fmt::format_int(seconds / 60).c_str(), // minutes
|
||||||
|
|||||||
+15
-15
@@ -123,7 +123,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
|||||||
RuleB(Inventory, EnforceAugmentRestriction) &&
|
RuleB(Inventory, EnforceAugmentRestriction) &&
|
||||||
user->IsAugmentRestricted(tobe_auged->GetItemType(), auged_with->GetAugmentRestriction())
|
user->IsAugmentRestricted(tobe_auged->GetItemType(), auged_with->GetAugmentRestriction())
|
||||||
) {
|
) {
|
||||||
user->MessageString(Chat::Red, AUGMENT_RESTRICTED);
|
user->MessageString(Chat::Red, ClientString::AUGMENT_RESTRICTED);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,13 +349,13 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
|||||||
Strings::ToInt(container->GetItem()->IDFile + 2)
|
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)) {
|
if (RuleB(Inventory, DeleteTransformationMold)) {
|
||||||
user->DeleteItemInInventory(in_combine->container_slot, 0, true);
|
user->DeleteItemInInventory(in_combine->container_slot, 0, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (inst) {
|
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);
|
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
||||||
user->QueuePacket(outapp);
|
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);
|
user->DeleteItemInInventory(EQ::InventoryProfile::CalcSlotId(in_combine->container_slot, 0), 0, true);
|
||||||
container->Clear();
|
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->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) {
|
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);
|
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
||||||
user->QueuePacket(outapp);
|
user->QueuePacket(outapp);
|
||||||
@@ -407,7 +407,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
|||||||
LogTradeskillsDetail("Check 2");
|
LogTradeskillsDetail("Check 2");
|
||||||
|
|
||||||
if (!is_augmented) {
|
if (!is_augmented) {
|
||||||
user->MessageString(Chat::Emote, TRADESKILL_NOCOMBINE);
|
user->MessageString(Chat::Emote, ClientString::TRADESKILL_NOCOMBINE);
|
||||||
} else {
|
} else {
|
||||||
user->Message(Chat::Emote, "You must remove augments from all component items before you can attempt this combine.");
|
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
|
// Update Made count
|
||||||
if (success) {
|
if (success) {
|
||||||
if (!spec.has_learnt && ((spec.must_learn&0x10) != 0x10)) {
|
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);
|
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);
|
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) {
|
for (auto it = MissingItems.begin(); it != MissingItems.end(); ++it) {
|
||||||
const EQ::ItemData* item = database.GetItem(*it);
|
const EQ::ItemData* item = database.GetItem(*it);
|
||||||
|
|
||||||
if(item)
|
if(item)
|
||||||
user->MessageString(Chat::Skills, TRADESKILL_MISSING_ITEM, item->Name);
|
user->MessageString(Chat::Skills, ClientString::TRADESKILL_MISSING_ITEM, item->Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -786,7 +786,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
|
|||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
if (!spec.has_learnt && ((spec.must_learn & 0x10) != 0x10)) {
|
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);
|
database.UpdateRecipeMadecount(spec.recipe_id, user->CharacterID(), spec.madecount+1);
|
||||||
}
|
}
|
||||||
@@ -1104,7 +1104,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
|||||||
chance = 100;
|
chance = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageString(Chat::Emote, TRADESKILL_TRIVIAL);
|
MessageString(Chat::Emote, ClientString::TRADESKILL_TRIVIAL);
|
||||||
} else if(chance < 5) {
|
} else if(chance < 5) {
|
||||||
// Minimum chance is always 5
|
// Minimum chance is always 5
|
||||||
chance = 5;
|
chance = 5;
|
||||||
@@ -1141,7 +1141,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
|||||||
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
|
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");
|
LogTradeskills("Tradeskill success");
|
||||||
|
|
||||||
@@ -1189,7 +1189,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
|||||||
if(over_trivial < 0)
|
if(over_trivial < 0)
|
||||||
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
|
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
|
||||||
|
|
||||||
MessageString(Chat::Emote,TRADESKILL_FAILED);
|
MessageString(Chat::Emote, ClientString::TRADESKILL_FAILED);
|
||||||
|
|
||||||
LogTradeskills("Tradeskill failed");
|
LogTradeskills("Tradeskill failed");
|
||||||
if (GetGroup())
|
if (GetGroup())
|
||||||
@@ -1714,7 +1714,7 @@ void Client::LearnRecipe(uint32 recipe_id)
|
|||||||
return;
|
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(
|
database.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
@@ -1921,7 +1921,7 @@ bool Client::CheckTradeskillLoreConflict(int32 recipe_id)
|
|||||||
linker.SetLinkType(EQ::saylink::SayLinkItemData);
|
linker.SetLinkType(EQ::saylink::SayLinkItemData);
|
||||||
linker.SetItemData(tre_inst);
|
linker.SetItemData(tre_inst);
|
||||||
auto item_link = linker.GenerateLink();
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -914,7 +914,7 @@ void Client::TraderStartTrader(const EQApplicationPacket *app)
|
|||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageString(Chat::Yellow, TRADER_MODE_ON);
|
MessageString(Chat::Yellow, ClientString::TRADER_MODE_ON);
|
||||||
SetTrader(true);
|
SetTrader(true);
|
||||||
SendTraderMode(TraderOn);
|
SendTraderMode(TraderOn);
|
||||||
SendBecomeTraderToWorld(this, TraderOn);
|
SendBecomeTraderToWorld(this, TraderOn);
|
||||||
@@ -1571,7 +1571,7 @@ void Client::SendBazaarWelcome()
|
|||||||
void Client::SendBarterWelcome()
|
void Client::SendBarterWelcome()
|
||||||
{
|
{
|
||||||
const auto results = BuyerBuyLinesRepository::GetWelcomeData(database);
|
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)
|
void Client::DoBazaarSearch(BazaarSearchCriteria_Struct search_criteria)
|
||||||
@@ -1823,7 +1823,7 @@ void Client::ShowBuyLines(const EQApplicationPacket *app)
|
|||||||
if (!buyer || buyer->GetCustomerID()) {
|
if (!buyer || buyer->GetCustomerID()) {
|
||||||
bir->approval = 0; // Tell the client that the Buyer is unavailable
|
bir->approval = 0; // Tell the client that the Buyer is unavailable
|
||||||
QueuePacket(app);
|
QueuePacket(app);
|
||||||
MessageString(Chat::Yellow, TRADER_BUSY);
|
MessageString(Chat::Yellow, ClientString::TRADER_BUSY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1839,7 +1839,7 @@ void Client::ShowBuyLines(const EQApplicationPacket *app)
|
|||||||
greeting = "Welcome!";
|
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());
|
const std::string name(GetName());
|
||||||
buyer->SendSellerBrowsing(name);
|
buyer->SendSellerBrowsing(name);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -971,7 +971,7 @@ void Mob::TuneDoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts,
|
|||||||
int strike_through = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
|
int strike_through = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
|
||||||
if (strike_through && zone->random.Roll(strike_through)) {
|
if (strike_through && zone->random.Roll(strike_through)) {
|
||||||
MessageString(Chat::StrikeThrough,
|
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
|
hit.damage_done = 1; // set to one, we will check this to continue
|
||||||
}
|
}
|
||||||
// I'm pretty sure you can riposte a riposte
|
// 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
|
else if (GetClass() == Class::Ranger && GetLevel() > 50) { // no double dmg on headshot
|
||||||
if ((defender->IsNPC() && !defender->IsMoving() && !defender->IsRooted()) || !RuleB(Combat, ArcheryBonusRequiresStationary)) {
|
if ((defender->IsNPC() && !defender->IsMoving() && !defender->IsRooted()) || !RuleB(Combat, ArcheryBonusRequiresStationary)) {
|
||||||
hit.damage_done *= 2;
|
hit.damage_done *= 2;
|
||||||
MessageString(Chat::MeleeCrit, BOW_DOUBLE_DAMAGE);
|
MessageString(Chat::MeleeCrit, ClientString::BOW_DOUBLE_DAMAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,11 +245,11 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
if (client && client->Connected()) {
|
if (client && client->Connected()) {
|
||||||
if (scm->chan_num == ChatChannel_TellEcho) {
|
if (scm->chan_num == ChatChannel_TellEcho) {
|
||||||
if (scm->queued == 1) // tell was queued
|
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
|
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
|
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'"
|
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
|
// 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);
|
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);
|
Client* client = entity_list.GetClientByID(wars->id);
|
||||||
if (client) {
|
if (client) {
|
||||||
if (pack->size == 64)//no results
|
if (pack->size == 64)//no results
|
||||||
client->MessageString(Chat::White, WHOALL_NO_RESULTS);
|
client->MessageString(Chat::White, ClientString::WHOALL_NO_RESULTS);
|
||||||
else {
|
else {
|
||||||
auto outapp = new EQApplicationPacket(OP_WhoAllResponse, pack->size);
|
auto outapp = new EQApplicationPacket(OP_WhoAllResponse, pack->size);
|
||||||
memcpy(outapp->pBuffer, pack->pBuffer, 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);
|
Client* c = entity_list.GetClientByName(Rezzer);
|
||||||
|
|
||||||
if (c)
|
if (c)
|
||||||
c->MessageString(Chat::SpellWornOff, REZZ_ALREADY_PENDING);
|
c->MessageString(Chat::SpellWornOff, ClientString::REZZ_ALREADY_PENDING);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3674,7 +3674,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
|||||||
if (strcasecmp(c.second->GetCleanName(), in->send_to) == 0) {
|
if (strcasecmp(c.second->GetCleanName(), in->send_to) == 0) {
|
||||||
c.second->MessageString(
|
c.second->MessageString(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
PARCEL_DELIVERY_ARRIVED
|
ClientString::PARCEL_DELIVERY_ARRIVED
|
||||||
);
|
);
|
||||||
c.second->SendParcelStatus();
|
c.second->SendParcelStatus();
|
||||||
if (c.second->GetEngagedWithParcelMerchant()) {
|
if (c.second->GetEngagedWithParcelMerchant()) {
|
||||||
|
|||||||
+2
-2
@@ -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);
|
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
|
||||||
break;
|
break;
|
||||||
case SummonPC:
|
case SummonPC:
|
||||||
MessageString(Chat::Yellow, PLAYER_SUMMONED);
|
MessageString(Chat::Yellow, ClientString::PLAYER_SUMMONED);
|
||||||
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
|
ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm);
|
||||||
break;
|
break;
|
||||||
case Rewind:
|
case Rewind:
|
||||||
@@ -1098,7 +1098,7 @@ void Client::Gate(uint8 bind_number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NPC::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);
|
Mob::Gate(bind_number);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user