mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Refactor message functions
This commit is contained in:
parent
57354579aa
commit
9f25c9070c
@ -130,7 +130,7 @@
|
||||
int32 GetFollowID();
|
||||
|
||||
virtual void Message(int32 type, const char* message, ...);
|
||||
virtual void Message_StringID(int32 type, int32 string_id, int32 distance = 0);
|
||||
virtual void MessageString(int32 type, int32 string_id, int32 distance = 0);
|
||||
void Say(const char *format, ...);
|
||||
void Shout(const char *format, ...);
|
||||
void Emote(const char *format, ...);
|
||||
|
||||
@ -1091,7 +1091,7 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
|
||||
SendAlternateAdvancementStats();
|
||||
|
||||
if(rank->prev) {
|
||||
Message_StringID(Chat::Yellow, AA_IMPROVE,
|
||||
MessageString(Chat::Yellow, AA_IMPROVE,
|
||||
std::to_string(rank->title_sid).c_str(),
|
||||
std::to_string(rank->prev->current_value).c_str(),
|
||||
std::to_string(cost).c_str(),
|
||||
@ -1104,7 +1104,7 @@ void Client::FinishAlternateAdvancementPurchase(AA::Rank *rank, bool ignore_cost
|
||||
}
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::Yellow, AA_GAIN_ABILITY,
|
||||
MessageString(Chat::Yellow, AA_GAIN_ABILITY,
|
||||
std::to_string(rank->title_sid).c_str(),
|
||||
std::to_string(cost).c_str(),
|
||||
cost == 1 ? std::to_string(AA_POINT).c_str() : std::to_string(AA_POINTS).c_str());
|
||||
@ -1200,7 +1200,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
|
||||
CommonBreakInvisible();
|
||||
|
||||
if (spells[rank->spell].sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
|
||||
Message_StringID(Chat::SpellFailure, SNEAK_RESTRICT);
|
||||
MessageString(Chat::SpellFailure, SNEAK_RESTRICT);
|
||||
return;
|
||||
}
|
||||
//
|
||||
@ -1214,7 +1214,7 @@ void Client::ActivateAlternateAdvancementAbility(int rank_id, int target_id) {
|
||||
SetAppearance(eaStanding, false);
|
||||
|
||||
if (GetAppearance() != eaStanding) {
|
||||
Message_StringID(Chat::SpellFailure, STAND_TO_CAST);
|
||||
MessageString(Chat::SpellFailure, STAND_TO_CAST);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1319,7 +1319,7 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts)
|
||||
if (other->AvoidDamage(this, hit)) {
|
||||
int strike_through = itembonuses.StrikeThrough + spellbonuses.StrikeThrough + aabonuses.StrikeThrough;
|
||||
if (strike_through && zone->random.Roll(strike_through)) {
|
||||
Message_StringID(Chat::StrikeThrough,
|
||||
MessageString(Chat::StrikeThrough,
|
||||
STRIKETHROUGH_STRING); // You strike through your opponents defenses!
|
||||
hit.damage_done = 1; // set to one, we will check this to continue
|
||||
}
|
||||
@ -1340,9 +1340,9 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts)
|
||||
int stun_resist2 = other->spellbonuses.FrontalStunResist + other->itembonuses.FrontalStunResist + other->aabonuses.FrontalStunResist;
|
||||
int stun_resist = other->spellbonuses.StunResist + other->itembonuses.StunResist + other->aabonuses.StunResist;
|
||||
if (zone->random.Roll(stun_resist2)) {
|
||||
other->Message_StringID(Chat::Stun, AVOID_STUNNING_BLOW);
|
||||
other->MessageString(Chat::Stun, AVOID_STUNNING_BLOW);
|
||||
} else if (zone->random.Roll(stun_resist)) {
|
||||
other->Message_StringID(Chat::Stun, SHAKE_OFF_STUN);
|
||||
other->MessageString(Chat::Stun, SHAKE_OFF_STUN);
|
||||
} else {
|
||||
other->Stun(3000); // yuck -- 3 seconds
|
||||
}
|
||||
@ -1392,7 +1392,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
|
||||
if (DivineAura() && !GetGM()) {//cant attack while invulnerable unless your a gm
|
||||
Log(Logs::Detail, Logs::Combat, "Attack canceled, Divine Aura is in effect.");
|
||||
Message_StringID(Chat::DefaultText, DIVINE_AURA_NO_ATK); //You can't attack while invulnerable!
|
||||
MessageString(Chat::DefaultText, DIVINE_AURA_NO_ATK); //You can't attack while invulnerable!
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1615,7 +1615,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQEmu::skills::Sk
|
||||
if (killerMob && killerMob->IsClient() && (spell != SPELL_UNKNOWN) && damage > 0) {
|
||||
char val1[20] = { 0 };
|
||||
|
||||
entity_list.MessageClose_StringID(
|
||||
entity_list.MessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, DamageMessages),
|
||||
@ -1624,7 +1624,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQEmu::skills::Sk
|
||||
killerMob->GetCleanName(), /* Message1 */
|
||||
GetCleanName(), /* Message2 */
|
||||
ConvertArray(damage, val1)/* Message3 */
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
int exploss = 0;
|
||||
@ -2129,7 +2129,7 @@ void NPC::Damage(Mob* other, int32 damage, uint16 spell_id, EQEmu::skills::Skill
|
||||
{
|
||||
if (IsLDoNTrapped())
|
||||
{
|
||||
Message_StringID(Chat::Red, LDON_ACCIDENT_SETOFF2);
|
||||
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
|
||||
SpellFinished(GetLDoNTrapSpellID(), other, EQEmu::spells::CastingSlot::Item, 0, -1, spells[GetLDoNTrapSpellID()].ResistDiff, false);
|
||||
SetLDoNTrapSpellID(0);
|
||||
SetLDoNTrapped(false);
|
||||
@ -2169,7 +2169,7 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQEmu::skills::Skil
|
||||
if (killer_mob->IsClient() && (spell != SPELL_UNKNOWN) && damage > 0) {
|
||||
char val1[20] = { 0 };
|
||||
|
||||
entity_list.MessageClose_StringID(
|
||||
entity_list.MessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, DamageMessages),
|
||||
@ -2178,7 +2178,7 @@ bool NPC::Death(Mob* killer_mob, int32 damage, uint16 spell, EQEmu::skills::Skil
|
||||
killer_mob->GetCleanName(), /* Message1 */
|
||||
GetCleanName(), /* Message2 */
|
||||
ConvertArray(damage, val1) /* Message3 */
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -3439,7 +3439,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
Log(Logs::Detail, Logs::Aggro, "Sending pet %s into battle due to attack.", pet->GetName());
|
||||
pet->AddToHateList(attacker, 1, 0, true, false, false, spell_id);
|
||||
pet->SetTarget(attacker);
|
||||
Message_StringID(Chat::NPCQuestSay, PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
|
||||
MessageString(Chat::NPCQuestSay, PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -3507,7 +3507,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
//fade mez if we are mezzed
|
||||
if (IsMezzed() && attacker) {
|
||||
Log(Logs::Detail, Logs::Combat, "Breaking mez due to attack.");
|
||||
entity_list.MessageClose_StringID(
|
||||
entity_list.MessageCloseString(
|
||||
this, /* Sender */
|
||||
true, /* Skip Sender */
|
||||
RuleI(Range, SpellMessages),
|
||||
@ -3515,7 +3515,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
HAS_BEEN_AWAKENED, // %1 has been awakened by %2.
|
||||
GetCleanName(), /* Message1 */
|
||||
attacker->GetCleanName() /* Message2 */
|
||||
);
|
||||
);
|
||||
BuffFadeByEffect(SE_Mez);
|
||||
}
|
||||
|
||||
@ -3564,13 +3564,13 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
else {
|
||||
// stun resist passed!
|
||||
if (IsClient())
|
||||
Message_StringID(Chat::Stun, SHAKE_OFF_STUN);
|
||||
MessageString(Chat::Stun, SHAKE_OFF_STUN);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// stun resist 2 passed!
|
||||
if (IsClient())
|
||||
Message_StringID(Chat::Stun, AVOID_STUNNING_BLOW);
|
||||
MessageString(Chat::Stun, AVOID_STUNNING_BLOW);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -3650,7 +3650,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
if (((spell_id != SPELL_UNKNOWN) || (FromDamageShield)) && damage>0) {
|
||||
//special crap for spell damage, looks hackish to me
|
||||
char val1[20] = { 0 };
|
||||
owner->Message_StringID(Chat::NonMelee, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
|
||||
owner->MessageString(Chat::NonMelee, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
|
||||
}
|
||||
else {
|
||||
if (damage > 0) {
|
||||
@ -3680,10 +3680,10 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
char val1[20] = { 0 };
|
||||
if (FromDamageShield) {
|
||||
if (attacker->CastToClient()->GetFilter(FilterDamageShields) != FilterHide)
|
||||
attacker->Message_StringID(Chat::DamageShield, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
|
||||
attacker->MessageString(Chat::DamageShield, OTHER_HIT_NONMELEE, GetCleanName(), ConvertArray(damage, val1));
|
||||
}
|
||||
else {
|
||||
entity_list.MessageClose_StringID(
|
||||
entity_list.MessageCloseString(
|
||||
this, /* Sender */
|
||||
true, /* Skip Sender */
|
||||
RuleI(Range, SpellMessages),
|
||||
@ -3692,7 +3692,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
attacker->GetCleanName(), /* Message1 */
|
||||
GetCleanName(), /* Message2 */
|
||||
ConvertArray(damage, val1) /* Message3 */
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -3754,11 +3754,11 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
// So we can see our dot dmg like live shows it.
|
||||
if (spell_id != SPELL_UNKNOWN && damage > 0 && attacker && attacker != this && attacker->IsClient()) {
|
||||
//might filter on (attack_skill>200 && attack_skill<250), but I dont think we need it
|
||||
attacker->FilteredMessage_StringID(attacker, Chat::DotDamage, FilterDOT,
|
||||
attacker->FilteredMessageString(attacker, Chat::DotDamage, FilterDOT,
|
||||
YOUR_HIT_DOT, GetCleanName(), itoa(damage), spells[spell_id].name);
|
||||
|
||||
/* older clients don't have the below String ID, but it will be filtered */
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
attacker, /* Sender */
|
||||
true, /* Skip Sender */
|
||||
RuleI(Range, SpellMessages),
|
||||
@ -3792,37 +3792,37 @@ void Mob::HealDamage(uint32 amount, Mob *caster, uint16 spell_id)
|
||||
// message to caster
|
||||
if (caster->IsClient() && caster == this) {
|
||||
if (caster->CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater)
|
||||
FilteredMessage_StringID(caster, Chat::NonMelee, FilterHealOverTime,
|
||||
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
||||
HOT_HEAL_SELF, itoa(acthealed), spells[spell_id].name);
|
||||
else
|
||||
FilteredMessage_StringID(caster, Chat::NonMelee, FilterHealOverTime,
|
||||
FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
||||
YOU_HEALED, GetCleanName(), itoa(acthealed));
|
||||
}
|
||||
else if (caster->IsClient() && caster != this) {
|
||||
if (caster->CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater)
|
||||
caster->FilteredMessage_StringID(caster, Chat::NonMelee, FilterHealOverTime,
|
||||
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
||||
HOT_HEAL_OTHER, GetCleanName(), itoa(acthealed),
|
||||
spells[spell_id].name);
|
||||
else
|
||||
caster->FilteredMessage_StringID(caster, Chat::NonMelee, FilterHealOverTime,
|
||||
caster->FilteredMessageString(caster, Chat::NonMelee, FilterHealOverTime,
|
||||
YOU_HEAL, GetCleanName(), itoa(acthealed));
|
||||
}
|
||||
// message to target
|
||||
if (IsClient() && caster != this) {
|
||||
if (CastToClient()->ClientVersionBit() & EQEmu::versions::maskSoFAndLater)
|
||||
FilteredMessage_StringID(this, Chat::NonMelee, FilterHealOverTime,
|
||||
FilteredMessageString(this, Chat::NonMelee, FilterHealOverTime,
|
||||
HOT_HEALED_OTHER, caster->GetCleanName(),
|
||||
itoa(acthealed), spells[spell_id].name);
|
||||
else
|
||||
FilteredMessage_StringID(this, Chat::NonMelee, FilterHealOverTime,
|
||||
FilteredMessageString(this, Chat::NonMelee, FilterHealOverTime,
|
||||
YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
|
||||
}
|
||||
}
|
||||
else { // normal heals
|
||||
FilteredMessage_StringID(caster, Chat::NonMelee, FilterSpellDamage,
|
||||
FilteredMessageString(caster, Chat::NonMelee, FilterSpellDamage,
|
||||
YOU_HEALED, caster->GetCleanName(), itoa(acthealed));
|
||||
if (caster != this)
|
||||
caster->FilteredMessage_StringID(caster, Chat::NonMelee, FilterSpellDamage,
|
||||
caster->FilteredMessageString(caster, Chat::NonMelee, FilterSpellDamage,
|
||||
YOU_HEAL, GetCleanName(), itoa(acthealed));
|
||||
}
|
||||
}
|
||||
@ -3993,10 +3993,10 @@ void Mob::TryWeaponProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData *
|
||||
if (IsPet()) {
|
||||
Mob *own = GetOwner();
|
||||
if (own)
|
||||
own->Message_StringID(Chat::Red, PROC_PETTOOLOW);
|
||||
own->MessageString(Chat::Red, PROC_PETTOOLOW);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::Red, PROC_TOOLOW);
|
||||
MessageString(Chat::Red, PROC_TOOLOW);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -4030,10 +4030,10 @@ void Mob::TryWeaponProc(const EQEmu::ItemInstance *inst, const EQEmu::ItemData *
|
||||
if (IsPet()) {
|
||||
Mob *own = GetOwner();
|
||||
if (own)
|
||||
own->Message_StringID(Chat::Red, PROC_PETTOOLOW);
|
||||
own->MessageString(Chat::Red, PROC_PETTOOLOW);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::Red, PROC_TOOLOW);
|
||||
MessageString(Chat::Red, PROC_TOOLOW);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -4183,7 +4183,7 @@ void Mob::TryPetCriticalHit(Mob *defender, DamageHitInfo &hit)
|
||||
hit.damage_done += 5;
|
||||
hit.damage_done = (hit.damage_done * critMod) / 100;
|
||||
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, CriticalDamage),
|
||||
@ -4192,7 +4192,7 @@ void Mob::TryPetCriticalHit(Mob *defender, DamageHitInfo &hit)
|
||||
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
@ -4243,7 +4243,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
|
||||
/* Female */
|
||||
if (GetGender() == 1) {
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, CriticalDamage),
|
||||
@ -4252,11 +4252,11 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
FEMALE_SLAYUNDEAD, /* MessageFormat: %1's holy blade cleanses her target!(%2) */
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
);
|
||||
}
|
||||
/* Males and Neuter */
|
||||
else {
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, CriticalDamage),
|
||||
@ -4265,7 +4265,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
MALE_SLAYUNDEAD, /* MessageFormat: %1's holy blade cleanses his target!(%2) */
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -4340,7 +4340,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
}
|
||||
hit.damage_done = hit.damage_done * 200 / 100;
|
||||
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, CriticalDamage),
|
||||
@ -4349,7 +4349,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
DEADLY_STRIKE, /* MessageFormat: %1 scores a Deadly Strike!(%2) */
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -4368,7 +4368,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
hit.damage_done += og_damage * 119 / 100;
|
||||
Log(Logs::Detail, Logs::Combat, "Crip damage %d", hit.damage_done);
|
||||
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, CriticalDamage),
|
||||
@ -4377,7 +4377,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
CRIPPLING_BLOW, /* MessageFormat: %1 lands a Crippling Blow!(%2) */
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
);
|
||||
|
||||
// Crippling blows also have a chance to stun
|
||||
// Kayen: Crippling Blow would cause a chance to interrupt for npcs < 55, with a
|
||||
@ -4390,7 +4390,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
}
|
||||
|
||||
/* Normal Critical hit message */
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, CriticalDamage),
|
||||
@ -4399,7 +4399,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4427,7 +4427,7 @@ bool Mob::TryFinishingBlow(Mob *defender, int &damage)
|
||||
(ProcChance >= zone->random.Int(1, 1000))) {
|
||||
|
||||
/* Finishing Blow Critical Message */
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, CriticalDamage),
|
||||
@ -4435,7 +4435,7 @@ bool Mob::TryFinishingBlow(Mob *defender, int &damage)
|
||||
FilterMeleeCrits, /* FilterType: 12 */
|
||||
FINISHING_BLOW, /* MessageFormat: %1 scores a Finishing Blow!!) */
|
||||
GetCleanName() /* Message1 */
|
||||
);
|
||||
);
|
||||
|
||||
damage = FB_Dmg;
|
||||
return true;
|
||||
@ -4453,7 +4453,7 @@ void Mob::DoRiposte(Mob *defender)
|
||||
|
||||
// so ahhh the angle you can riposte is larger than the angle you can hit :P
|
||||
if (!defender->IsFacingMob(this)) {
|
||||
defender->Message_StringID(Chat::TooFarAway, CANT_SEE_TARGET);
|
||||
defender->MessageString(Chat::TooFarAway, CANT_SEE_TARGET);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5042,7 +5042,7 @@ void Mob::CommonOutgoingHitSuccess(Mob* defender, DamageHitInfo &hit, ExtraAttac
|
||||
else if (GetClass() == RANGER && GetLevel() > 50) { // no double dmg on headshot
|
||||
if ((defender->IsNPC() && !defender->IsMoving() && !defender->IsRooted()) || !RuleB(Combat, ArcheryBonusRequiresStationary)) {
|
||||
hit.damage_done *= 2;
|
||||
Message_StringID(Chat::MeleeCrit, BOW_DOUBLE_DAMAGE);
|
||||
MessageString(Chat::MeleeCrit, BOW_DOUBLE_DAMAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5347,7 +5347,7 @@ void Client::DoAttackRounds(Mob *target, int hand, bool IsFromSpell)
|
||||
Attack(target, hand, false, false, IsFromSpell);
|
||||
if (zone->random.Roll(flurrychance))
|
||||
Attack(target, hand, false, false, IsFromSpell);
|
||||
Message_StringID(Chat::NPCFlurry, YOU_FLURRY);
|
||||
MessageString(Chat::NPCFlurry, YOU_FLURRY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -841,10 +841,10 @@ void Mob::AddTrap(Aura *aura, AuraRecord &record)
|
||||
bool Mob::CanSpawnAura(bool trap)
|
||||
{
|
||||
if (trap && !HasFreeTrapSlots()) {
|
||||
Message_StringID(Chat::SpellFailure, NO_MORE_TRAPS);
|
||||
MessageString(Chat::SpellFailure, NO_MORE_TRAPS);
|
||||
return false;
|
||||
} else if (!trap && !HasFreeAuraSlots()) {
|
||||
Message_StringID(Chat::SpellFailure, NO_MORE_AURAS);
|
||||
MessageString(Chat::SpellFailure, NO_MORE_AURAS);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -2808,7 +2808,7 @@ void Bot::AI_Process() {
|
||||
int32 flurrychance = (aabonuses.FlurryChance + spellbonuses.FlurryChance + itembonuses.FlurryChance);
|
||||
if (flurrychance) {
|
||||
if (zone->random.Int(0, 100) < flurrychance) {
|
||||
Message_StringID(Chat::NPCFlurry, YOU_FLURRY);
|
||||
MessageString(Chat::NPCFlurry, YOU_FLURRY);
|
||||
Attack(tar, EQEmu::invslot::slotPrimary, false);
|
||||
|
||||
TEST_TARGET();
|
||||
@ -6444,11 +6444,11 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, EQEmu::spells::CastingSlo
|
||||
if(!IsValidSpell(spell_id) || casting_spell_id || delaytimer || spellend_timer.Enabled() || IsStunned() || IsFeared() || IsMezzed() || (IsSilenced() && !IsDiscipline(spell_id)) || (IsAmnesiad() && IsDiscipline(spell_id))) {
|
||||
Log(Logs::Detail, Logs::Spells, "Spell casting canceled: not able to cast now. Valid? %d, casting %d, waiting? %d, spellend? %d, stunned? %d, feared? %d, mezed? %d, silenced? %d", IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced() );
|
||||
if(IsSilenced() && !IsDiscipline(spell_id))
|
||||
Message_StringID(Chat::Red, SILENCED_STRING);
|
||||
MessageString(Chat::Red, SILENCED_STRING);
|
||||
|
||||
if(IsAmnesiad() && IsDiscipline(spell_id))
|
||||
|
||||
Message_StringID(Chat::Red, MELEE_SILENCE);
|
||||
MessageString(Chat::Red, MELEE_SILENCE);
|
||||
|
||||
if(casting_spell_id)
|
||||
AI_Event_SpellCastFinished(false, static_cast<uint16>(casting_spell_slot));
|
||||
@ -6458,7 +6458,7 @@ bool Bot::CastSpell(uint16 spell_id, uint16 target_id, EQEmu::spells::CastingSlo
|
||||
}
|
||||
|
||||
if(IsDetrimentalSpell(spell_id) && !zone->CanDoCombat()){
|
||||
Message_StringID(Chat::Red, SPELL_WOULDNT_HOLD);
|
||||
MessageString(Chat::Red, SPELL_WOULDNT_HOLD);
|
||||
if(casting_spell_id)
|
||||
AI_Event_SpellCastFinished(false, static_cast<uint16>(casting_spell_slot));
|
||||
|
||||
|
||||
@ -7284,7 +7284,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep)
|
||||
int ab_mask = (ActionableBots::ABM_Target | ActionableBots::ABM_ByName);
|
||||
|
||||
if (c->GetTradeskillObject() || (c->trade->state == Trading)) {
|
||||
c->Message_StringID(Chat::Tell, MERCHANT_BUSY);
|
||||
c->MessageString(Chat::Tell, MERCHANT_BUSY);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7310,7 +7310,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep)
|
||||
itm = itminst->GetItem();
|
||||
|
||||
if (itminst && itm && c->CheckLoreConflict(itm)) {
|
||||
c->Message_StringID(Chat::WhiteSmoke, PICK_LORE);
|
||||
c->MessageString(Chat::WhiteSmoke, PICK_LORE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7324,7 +7324,7 @@ void bot_subcommand_inventory_remove(Client *c, const Seperator *sep)
|
||||
if (!c->CheckLoreConflict(itma->GetItem()))
|
||||
continue;
|
||||
|
||||
c->Message_StringID(Chat::WhiteSmoke, PICK_LORE);
|
||||
c->MessageString(Chat::WhiteSmoke, PICK_LORE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
108
zone/client.cpp
108
zone/client.cpp
@ -914,7 +914,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
{
|
||||
case ChatChannel_Guild: { /* Guild Chat */
|
||||
if (!IsInAGuild())
|
||||
Message_StringID(Chat::DefaultText, GUILD_NOT_MEMBER2); //You are not a member of any guild.
|
||||
MessageString(Chat::DefaultText, GUILD_NOT_MEMBER2); //You are not a member of any guild.
|
||||
else if (!guild_mgr.CheckPermission(GuildID(), GuildRank(), GUILD_SPEAK))
|
||||
Message(0, "Error: You dont have permission to speak to the guild.");
|
||||
else if (!worldserver.SendChannelMessage(this, targetname, chan_num, GuildID(), language, lang_skill, message))
|
||||
@ -1509,7 +1509,7 @@ void Client::IncreaseLanguageSkill(int skill_id, int value) {
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
|
||||
Message_StringID( Chat::Skills, LANG_SKILL_IMPROVED ); //Notify client
|
||||
MessageString( Chat::Skills, LANG_SKILL_IMPROVED ); //Notify client
|
||||
}
|
||||
|
||||
void Client::AddSkill(EQEmu::skills::SkillType skillid, uint16 value) {
|
||||
@ -2578,7 +2578,7 @@ void Client::SetPVP(bool toggle, bool message) {
|
||||
|
||||
if (message) {
|
||||
if(GetPVP())
|
||||
this->Message_StringID(Chat::Shout,PVP_ON);
|
||||
this->MessageString(Chat::Shout,PVP_ON);
|
||||
else
|
||||
Message(Chat::Red, "You no longer follow the ways of discord.");
|
||||
}
|
||||
@ -2714,22 +2714,22 @@ void Client::Disarm(Client* disarmer, int chance) {
|
||||
if (matslot != EQEmu::textures::materialInvalid)
|
||||
SendWearChange(matslot);
|
||||
}
|
||||
Message_StringID(Chat::Skills, DISARMED);
|
||||
MessageString(Chat::Skills, DISARMED);
|
||||
if (disarmer != this)
|
||||
disarmer->Message_StringID(Chat::Skills, DISARM_SUCCESS, this->GetCleanName());
|
||||
disarmer->MessageString(Chat::Skills, DISARM_SUCCESS, this->GetCleanName());
|
||||
if (chance != 1000)
|
||||
disarmer->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 4);
|
||||
CalcBonuses();
|
||||
// CalcEnduranceWeightFactor();
|
||||
return;
|
||||
}
|
||||
disarmer->Message_StringID(Chat::Skills, DISARM_FAILED);
|
||||
disarmer->MessageString(Chat::Skills, DISARM_FAILED);
|
||||
if (chance != 1000)
|
||||
disarmer->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
disarmer->Message_StringID(Chat::Skills, DISARM_FAILED);
|
||||
disarmer->MessageString(Chat::Skills, DISARM_FAILED);
|
||||
}
|
||||
|
||||
bool Client::BindWound(Mob *bindmob, bool start, bool fail)
|
||||
@ -2771,7 +2771,7 @@ bool Client::BindWound(Mob *bindmob, bool start, bool fail)
|
||||
} else {
|
||||
// send bindmob "stand still"
|
||||
if (!bindmob->IsAIControlled() && bindmob != this) {
|
||||
bindmob->CastToClient()->Message_StringID(Chat::Yellow,
|
||||
bindmob->CastToClient()->MessageString(Chat::Yellow,
|
||||
YOU_ARE_BEING_BANDAGED);
|
||||
} else if (bindmob->IsAIControlled() && bindmob != this) {
|
||||
; // Tell IPC to stand still?
|
||||
@ -3075,7 +3075,7 @@ void Client::ServerFilter(SetServerFilter_Struct* filter){
|
||||
}
|
||||
|
||||
// this version is for messages with no parameters
|
||||
void Client::Message_StringID(uint32 type, uint32 string_id, uint32 distance)
|
||||
void Client::MessageString(uint32 type, uint32 string_id, uint32 distance)
|
||||
{
|
||||
if (GetFilter(FilterSpellDamage) == FilterHide && type == Chat::NonMelee)
|
||||
return;
|
||||
@ -3103,7 +3103,7 @@ void Client::Message_StringID(uint32 type, uint32 string_id, uint32 distance)
|
||||
// to load the eqstr file and count them in the string.
|
||||
// This hack sucks but it's gonna work for now.
|
||||
//
|
||||
void Client::Message_StringID(uint32 type, uint32 string_id, const char* message1,
|
||||
void Client::MessageString(uint32 type, uint32 string_id, const char* message1,
|
||||
const char* message2,const char* message3,const char* message4,
|
||||
const char* message5,const char* message6,const char* message7,
|
||||
const char* message8,const char* message9, uint32 distance)
|
||||
@ -3126,7 +3126,7 @@ void Client::Message_StringID(uint32 type, uint32 string_id, const char* message
|
||||
|
||||
if(!message1)
|
||||
{
|
||||
Message_StringID(type, string_id); // use the simple message instead
|
||||
MessageString(type, string_id); // use the simple message instead
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3205,7 +3205,7 @@ bool Client::FilteredMessageCheck(Mob *sender, eqFilterType filter)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Client::FilteredMessage_StringID(Mob *sender, uint32 type,
|
||||
void Client::FilteredMessageString(Mob *sender, uint32 type,
|
||||
eqFilterType filter, uint32 string_id)
|
||||
{
|
||||
if (!FilteredMessageCheck(sender, filter))
|
||||
@ -3224,7 +3224,7 @@ void Client::FilteredMessage_StringID(Mob *sender, uint32 type,
|
||||
return;
|
||||
}
|
||||
|
||||
void Client::FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id,
|
||||
void Client::FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id,
|
||||
const char *message1, const char *message2, const char *message3,
|
||||
const char *message4, const char *message5, const char *message6,
|
||||
const char *message7, const char *message8, const char *message9)
|
||||
@ -3240,7 +3240,7 @@ void Client::FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType fil
|
||||
type = 4;
|
||||
|
||||
if (!message1) {
|
||||
FilteredMessage_StringID(sender, type, filter, string_id); // use the simple message instead
|
||||
FilteredMessageString(sender, type, filter, string_id); // use the simple message instead
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3281,7 +3281,7 @@ void Client::Tell_StringID(uint32 string_id, const char *who, const char *messag
|
||||
char string_id_str[10];
|
||||
snprintf(string_id_str, 10, "%d", string_id);
|
||||
|
||||
Message_StringID(Chat::EchoTell, TELL_QUEUED_MESSAGE, who, string_id_str, message);
|
||||
MessageString(Chat::EchoTell, TELL_QUEUED_MESSAGE, who, string_id_str, message);
|
||||
}
|
||||
|
||||
void Client::SetTint(int16 in_slot, uint32 color) {
|
||||
@ -3344,7 +3344,7 @@ void Client::SetLanguageSkill(int langid, int value)
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
|
||||
Message_StringID( Chat::Skills, LANG_SKILL_IMPROVED ); //Notify the client
|
||||
MessageString( Chat::Skills, LANG_SKILL_IMPROVED ); //Notify the client
|
||||
}
|
||||
|
||||
void Client::LinkDead()
|
||||
@ -3432,7 +3432,7 @@ void Client::Escape()
|
||||
entity_list.RemoveFromTargets(this, true);
|
||||
SetInvisible(1);
|
||||
|
||||
Message_StringID(Chat::Skills, ESCAPE);
|
||||
MessageString(Chat::Skills, ESCAPE);
|
||||
}
|
||||
|
||||
float Client::CalcPriceMod(Mob* other, bool reverse)
|
||||
@ -3872,13 +3872,13 @@ void Client::SacrificeConfirm(Client *caster)
|
||||
}
|
||||
|
||||
if (GetLevel() < RuleI(Spells, SacrificeMinLevel)) {
|
||||
caster->Message_StringID(Chat::Red, SAC_TOO_LOW); // This being is not a worthy sacrifice.
|
||||
caster->MessageString(Chat::Red, SAC_TOO_LOW); // This being is not a worthy sacrifice.
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetLevel() > RuleI(Spells, SacrificeMaxLevel)) {
|
||||
caster->Message_StringID(Chat::Red, SAC_TOO_HIGH);
|
||||
caster->MessageString(Chat::Red, SAC_TOO_HIGH);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
@ -3947,7 +3947,7 @@ void Client::Sacrifice(Client *caster)
|
||||
caster->SummonItem(RuleI(Spells, SacrificeItemID));
|
||||
}
|
||||
} else {
|
||||
caster->Message_StringID(Chat::Red, SAC_TOO_LOW); // This being is not a worthy sacrifice.
|
||||
caster->MessageString(Chat::Red, SAC_TOO_LOW); // This being is not a worthy sacrifice.
|
||||
}
|
||||
}
|
||||
|
||||
@ -4932,7 +4932,7 @@ void Client::HandleLDoNOpen(NPC *target)
|
||||
{
|
||||
if(target->GetLDoNTrapSpellID() != 0)
|
||||
{
|
||||
Message_StringID(Chat::Red, LDON_ACCIDENT_SETOFF2);
|
||||
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
|
||||
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].ResistDiff);
|
||||
target->SetLDoNTrapSpellID(0);
|
||||
target->SetLDoNTrapped(false);
|
||||
@ -4948,7 +4948,7 @@ void Client::HandleLDoNOpen(NPC *target)
|
||||
|
||||
if(target->IsLDoNLocked())
|
||||
{
|
||||
Message_StringID(Chat::Skills, LDON_STILL_LOCKED, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_STILL_LOCKED, target->GetCleanName());
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -4982,13 +4982,13 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
|
||||
{
|
||||
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
|
||||
{
|
||||
Message_StringID(Chat::Skills, LDON_CANT_DETERMINE_TRAP, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_CANT_DETERMINE_TRAP, target->GetCleanName());
|
||||
return;
|
||||
}
|
||||
|
||||
if(target->IsLDoNTrapDetected())
|
||||
{
|
||||
Message_StringID(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4997,10 +4997,10 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
|
||||
{
|
||||
case -1:
|
||||
case 0:
|
||||
Message_StringID(Chat::Skills, LDON_DONT_KNOW_TRAPPED, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_DONT_KNOW_TRAPPED, target->GetCleanName());
|
||||
break;
|
||||
case 1:
|
||||
Message_StringID(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_CERTAIN_TRAP, target->GetCleanName());
|
||||
target->SetLDoNTrapDetected(true);
|
||||
break;
|
||||
default:
|
||||
@ -5010,7 +5010,7 @@ void Client::HandleLDoNSenseTraps(NPC *target, uint16 skill, uint8 type)
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Skills, LDON_CERTAIN_NOT_TRAP, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_CERTAIN_NOT_TRAP, target->GetCleanName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5023,13 +5023,13 @@ void Client::HandleLDoNDisarm(NPC *target, uint16 skill, uint8 type)
|
||||
{
|
||||
if(!target->IsLDoNTrapped())
|
||||
{
|
||||
Message_StringID(Chat::Skills, LDON_WAS_NOT_TRAPPED, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_WAS_NOT_TRAPPED, target->GetCleanName());
|
||||
return;
|
||||
}
|
||||
|
||||
if((target->GetLDoNTrapType() == LDoNTypeCursed || target->GetLDoNTrapType() == LDoNTypeMagical) && type != target->GetLDoNTrapType())
|
||||
{
|
||||
Message_StringID(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5048,13 +5048,13 @@ void Client::HandleLDoNDisarm(NPC *target, uint16 skill, uint8 type)
|
||||
target->SetLDoNTrapDetected(false);
|
||||
target->SetLDoNTrapped(false);
|
||||
target->SetLDoNTrapSpellID(0);
|
||||
Message_StringID(Chat::Skills, LDON_HAVE_DISARMED, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_HAVE_DISARMED, target->GetCleanName());
|
||||
break;
|
||||
case 0:
|
||||
Message_StringID(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_HAVE_NOT_DISARMED, target->GetCleanName());
|
||||
break;
|
||||
case -1:
|
||||
Message_StringID(Chat::Red, LDON_ACCIDENT_SETOFF2);
|
||||
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
|
||||
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].ResistDiff);
|
||||
target->SetLDoNTrapSpellID(0);
|
||||
target->SetLDoNTrapped(false);
|
||||
@ -5073,7 +5073,7 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
|
||||
{
|
||||
if(target->IsLDoNTrapped())
|
||||
{
|
||||
Message_StringID(Chat::Red, LDON_ACCIDENT_SETOFF2);
|
||||
MessageString(Chat::Red, LDON_ACCIDENT_SETOFF2);
|
||||
target->SpellFinished(target->GetLDoNTrapSpellID(), this, EQEmu::spells::CastingSlot::Item, 0, -1, spells[target->GetLDoNTrapSpellID()].ResistDiff);
|
||||
target->SetLDoNTrapSpellID(0);
|
||||
target->SetLDoNTrapped(false);
|
||||
@ -5082,7 +5082,7 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
|
||||
|
||||
if(!target->IsLDoNLocked())
|
||||
{
|
||||
Message_StringID(Chat::Skills, LDON_WAS_NOT_LOCKED, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_WAS_NOT_LOCKED, target->GetCleanName());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5098,11 +5098,11 @@ void Client::HandleLDoNPickLock(NPC *target, uint16 skill, uint8 type)
|
||||
{
|
||||
case 0:
|
||||
case -1:
|
||||
Message_StringID(Chat::Skills, LDON_PICKLOCK_FAILURE, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_PICKLOCK_FAILURE, target->GetCleanName());
|
||||
break;
|
||||
case 1:
|
||||
target->SetLDoNLocked(false);
|
||||
Message_StringID(Chat::Skills, LDON_PICKLOCK_SUCCESS, target->GetCleanName());
|
||||
MessageString(Chat::Skills, LDON_PICKLOCK_SUCCESS, target->GetCleanName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -5607,7 +5607,7 @@ void Client::SuspendMinion()
|
||||
|
||||
CurrentPet->SetMana(m_suspendedminion.Mana);
|
||||
|
||||
Message_StringID(Chat::Magenta, SUSPEND_MINION_UNSUSPEND, CurrentPet->GetCleanName());
|
||||
MessageString(Chat::Magenta, SUSPEND_MINION_UNSUSPEND, CurrentPet->GetCleanName());
|
||||
|
||||
memset(&m_suspendedminion, 0, sizeof(struct PetInfo));
|
||||
// TODO: These pet command states need to be synced ...
|
||||
@ -5637,19 +5637,19 @@ void Client::SuspendMinion()
|
||||
{
|
||||
if(m_suspendedminion.SpellID > 0)
|
||||
{
|
||||
Message_StringID(Chat::Red,ONLY_ONE_PET);
|
||||
MessageString(Chat::Red,ONLY_ONE_PET);
|
||||
|
||||
return;
|
||||
}
|
||||
else if(CurrentPet->IsEngaged())
|
||||
{
|
||||
Message_StringID(Chat::Red,SUSPEND_MINION_FIGHTING);
|
||||
MessageString(Chat::Red,SUSPEND_MINION_FIGHTING);
|
||||
|
||||
return;
|
||||
}
|
||||
else if(entity_list.Fighting(CurrentPet))
|
||||
{
|
||||
Message_StringID(Chat::Blue,SUSPEND_MINION_HAS_AGGRO);
|
||||
MessageString(Chat::Blue,SUSPEND_MINION_HAS_AGGRO);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5666,7 +5666,7 @@ void Client::SuspendMinion()
|
||||
else
|
||||
strn0cpy(m_suspendedminion.Name, CurrentPet->GetName(), 64); // Name stays even at rank 1
|
||||
|
||||
Message_StringID(Chat::Magenta, SUSPEND_MINION_SUSPEND, CurrentPet->GetCleanName());
|
||||
MessageString(Chat::Magenta, SUSPEND_MINION_SUSPEND, CurrentPet->GetCleanName());
|
||||
|
||||
CurrentPet->Depop(false);
|
||||
|
||||
@ -5675,7 +5675,7 @@ void Client::SuspendMinion()
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Red, ONLY_SUMMONED_PETS);
|
||||
MessageString(Chat::Red, ONLY_SUMMONED_PETS);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -6149,16 +6149,16 @@ void Client::LocateCorpse()
|
||||
|
||||
if(ClosestCorpse)
|
||||
{
|
||||
Message_StringID(Chat::Spells, SENSE_CORPSE_DIRECTION);
|
||||
MessageString(Chat::Spells, SENSE_CORPSE_DIRECTION);
|
||||
SetHeading(CalculateHeadingToTarget(ClosestCorpse->GetX(), ClosestCorpse->GetY()));
|
||||
SetTarget(ClosestCorpse);
|
||||
SendTargetCommand(ClosestCorpse->GetID());
|
||||
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
|
||||
}
|
||||
else if(!GetTarget())
|
||||
Message_StringID(Chat::Red, SENSE_CORPSE_NONE);
|
||||
MessageString(Chat::Red, SENSE_CORPSE_NONE);
|
||||
else
|
||||
Message_StringID(Chat::Red, SENSE_CORPSE_NOT_NAME);
|
||||
MessageString(Chat::Red, SENSE_CORPSE_NOT_NAME);
|
||||
}
|
||||
|
||||
void Client::NPCSpawn(NPC *target_npc, const char *identifier, uint32 extra)
|
||||
@ -6218,7 +6218,7 @@ void Client::DragCorpses()
|
||||
if (!corpse || !corpse->IsPlayerCorpse() ||
|
||||
corpse->CastToCorpse()->IsBeingLooted() ||
|
||||
!corpse->CastToCorpse()->Summon(this, false, false)) {
|
||||
Message_StringID(Chat::DefaultText, CORPSEDRAG_STOP);
|
||||
MessageString(Chat::DefaultText, CORPSEDRAG_STOP);
|
||||
It = DraggedCorpses.erase(It);
|
||||
if (It == DraggedCorpses.end())
|
||||
break;
|
||||
@ -7623,7 +7623,7 @@ void Client::DuplicateLoreMessage(uint32 ItemID)
|
||||
{
|
||||
if (!(m_ClientVersionBit & EQEmu::versions::maskRoFAndLater))
|
||||
{
|
||||
Message_StringID(Chat::White, PICK_LORE);
|
||||
MessageString(Chat::White, PICK_LORE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7632,7 +7632,7 @@ void Client::DuplicateLoreMessage(uint32 ItemID)
|
||||
if(!item)
|
||||
return;
|
||||
|
||||
Message_StringID(Chat::White, PICK_LORE, item->Name);
|
||||
MessageString(Chat::White, PICK_LORE, item->Name);
|
||||
}
|
||||
|
||||
void Client::GarbleMessage(char *message, uint8 variance)
|
||||
@ -8031,13 +8031,13 @@ void Client::SendFactionMessage(int32 tmpvalue, int32 faction_id, int32 faction_
|
||||
if (tmpvalue == 0 || temp == 1 || temp == 2)
|
||||
return;
|
||||
else if (faction_value >= this_faction_max)
|
||||
Message_StringID(Chat::Yellow, FACTION_BEST, name);
|
||||
MessageString(Chat::Yellow, FACTION_BEST, name);
|
||||
else if (faction_value <= this_faction_min)
|
||||
Message_StringID(Chat::Yellow, FACTION_WORST, name);
|
||||
MessageString(Chat::Yellow, FACTION_WORST, name);
|
||||
else if (tmpvalue > 0 && faction_value < this_faction_max && !RuleB(Client, UseLiveFactionMessage))
|
||||
Message_StringID(Chat::Yellow, FACTION_BETTER, name);
|
||||
MessageString(Chat::Yellow, FACTION_BETTER, name);
|
||||
else if (tmpvalue < 0 && faction_value > this_faction_min && !RuleB(Client, UseLiveFactionMessage))
|
||||
Message_StringID(Chat::Yellow, FACTION_WORSE, name);
|
||||
MessageString(Chat::Yellow, FACTION_WORSE, name);
|
||||
else if (RuleB(Client, UseLiveFactionMessage))
|
||||
Message(Chat::Yellow, "Your faction standing with %s has been adjusted by %i.", name, tmpvalue); //New Live faction message (14261)
|
||||
|
||||
@ -8365,7 +8365,7 @@ void Client::Consume(const EQEmu::ItemData *item, uint8 type, int16 slot, bool a
|
||||
DeleteItemInInventory(slot, 1, false);
|
||||
|
||||
if (!auto_consume) // no message if the client consumed for us
|
||||
entity_list.MessageClose_StringID(this, true, 50, 0, EATING_MESSAGE, GetName(), item->Name);
|
||||
entity_list.MessageCloseString(this, true, 50, 0, EATING_MESSAGE, GetName(), item->Name);
|
||||
|
||||
Log(Logs::General, Logs::Food, "Eating from slot: %i", (int)slot);
|
||||
|
||||
@ -8383,7 +8383,7 @@ void Client::Consume(const EQEmu::ItemData *item, uint8 type, int16 slot, bool a
|
||||
increase, m_pp.thirst_level);
|
||||
|
||||
if (!auto_consume) // no message if the client consumed for us
|
||||
entity_list.MessageClose_StringID(this, true, 50, 0, DRINKING_MESSAGE, GetName(), item->Name);
|
||||
entity_list.MessageCloseString(this, true, 50, 0, DRINKING_MESSAGE, GetName(), item->Name);
|
||||
|
||||
Log(Logs::General, Logs::Food, "Drinking from slot: %i", (int)slot);
|
||||
}
|
||||
|
||||
@ -278,11 +278,11 @@ public:
|
||||
void SendBazaarWelcome();
|
||||
void DyeArmor(EQEmu::TintProfile* dye);
|
||||
uint8 SlotConvert(uint8 slot,bool bracer=false);
|
||||
void Message_StringID(uint32 type, uint32 string_id, uint32 distance = 0);
|
||||
void Message_StringID(uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
|
||||
void MessageString(uint32 type, uint32 string_id, uint32 distance = 0);
|
||||
void MessageString(uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
|
||||
bool FilteredMessageCheck(Mob *sender, eqFilterType filter);
|
||||
void FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id);
|
||||
void FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter,
|
||||
void FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id);
|
||||
void FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter,
|
||||
uint32 string_id, const char *message1, const char *message2 = nullptr,
|
||||
const char *message3 = nullptr, const char *message4 = nullptr,
|
||||
const char *message5 = nullptr, const char *message6 = nullptr,
|
||||
|
||||
@ -1752,14 +1752,14 @@ void Client::Handle_OP_AAAction(const EQApplicationPacket *app)
|
||||
}
|
||||
else if (action->action == aaActionDisableEXP) { //Turn Off AA Exp
|
||||
if (m_epp.perAA > 0)
|
||||
Message_StringID(Chat::White, AA_OFF);
|
||||
MessageString(Chat::White, AA_OFF);
|
||||
|
||||
m_epp.perAA = 0;
|
||||
SendAlternateAdvancementStats();
|
||||
}
|
||||
else if (action->action == aaActionSetEXP) {
|
||||
if (m_epp.perAA == 0)
|
||||
Message_StringID(Chat::White, AA_ON);
|
||||
MessageString(Chat::White, AA_ON);
|
||||
m_epp.perAA = action->exp_value;
|
||||
if (m_epp.perAA < 0 || m_epp.perAA > 100)
|
||||
m_epp.perAA = 0; // stop exploit with sanity check
|
||||
@ -2834,7 +2834,7 @@ void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app)
|
||||
|
||||
if (poison->Proc.Level2 > GetLevel()) {
|
||||
// Poison is too high to apply.
|
||||
Message_StringID(Chat::LightBlue, POISON_TOO_HIGH);
|
||||
MessageString(Chat::LightBlue, POISON_TOO_HIGH);
|
||||
}
|
||||
else if ((primary &&
|
||||
primary->ItemType == EQEmu::item::ItemType1HPiercing) ||
|
||||
@ -4023,7 +4023,7 @@ void Client::Handle_OP_CastSpell(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
if (IsAIControlled()) {
|
||||
this->Message_StringID(Chat::Red, NOT_IN_CONTROL);
|
||||
this->MessageString(Chat::Red, NOT_IN_CONTROL);
|
||||
//Message(Chat::Red, "You cant cast right now, you arent in control of yourself!");
|
||||
return;
|
||||
}
|
||||
@ -4625,7 +4625,7 @@ void Client::Handle_OP_Consent(const EQApplicationPacket *app)
|
||||
safe_delete(pack);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::White, CONSENT_YOURSELF);
|
||||
MessageString(Chat::White, CONSENT_YOURSELF);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -4765,10 +4765,10 @@ void Client::Handle_OP_Consider(const EQApplicationPacket *app)
|
||||
// this could be done better, but this is only called when you con so w/e
|
||||
// Shroud of Stealth has a special message
|
||||
if (improved_hidden && (!tmob->see_improved_hide && (tmob->see_invis || tmob->see_hide)))
|
||||
Message_StringID(Chat::NPCQuestSay, SOS_KEEPS_HIDDEN);
|
||||
MessageString(Chat::NPCQuestSay, SOS_KEEPS_HIDDEN);
|
||||
// we are trying to hide but they can see us
|
||||
else if ((invisible || invisible_undead || hidden || invisible_animals) && !IsInvisible(tmob))
|
||||
Message_StringID(Chat::NPCQuestSay, SUSPECT_SEES_YOU);
|
||||
MessageString(Chat::NPCQuestSay, SUSPECT_SEES_YOU);
|
||||
|
||||
safe_delete(outapp);
|
||||
|
||||
@ -4791,10 +4791,10 @@ void Client::Handle_OP_ConsiderCorpse(const EQApplicationPacket *app)
|
||||
min = (ttime / 60000) % 60; // Total seconds / 60 drop .00
|
||||
char val1[20] = { 0 };
|
||||
char val2[20] = { 0 };
|
||||
Message_StringID(Chat::NPCQuestSay, CORPSE_DECAY1, ConvertArray(min, val1), ConvertArray(sec, val2));
|
||||
MessageString(Chat::NPCQuestSay, CORPSE_DECAY1, ConvertArray(min, val1), ConvertArray(sec, val2));
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::NPCQuestSay, CORPSE_DECAY_NOW);
|
||||
MessageString(Chat::NPCQuestSay, CORPSE_DECAY_NOW);
|
||||
}
|
||||
}
|
||||
else if (tcorpse && tcorpse->IsPlayerCorpse()) {
|
||||
@ -4825,12 +4825,12 @@ void Client::Handle_OP_ConsiderCorpse(const EQApplicationPacket *app)
|
||||
Message(0, "This corpse can be resurrected for %i minutes and %i seconds.", min, sec);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::WhiteSmoke, CORPSE_TOO_OLD);
|
||||
MessageString(Chat::WhiteSmoke, CORPSE_TOO_OLD);
|
||||
}
|
||||
*/
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::NPCQuestSay, CORPSE_DECAY_NOW);
|
||||
MessageString(Chat::NPCQuestSay, CORPSE_DECAY_NOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4932,7 +4932,7 @@ void Client::Handle_OP_ControlBoat(const EQApplicationPacket *app)
|
||||
boat->SetTarget(this);
|
||||
}
|
||||
else {
|
||||
this->Message_StringID(Chat::Red, IN_USE);
|
||||
this->MessageString(Chat::Red, IN_USE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -4950,7 +4950,7 @@ void Client::Handle_OP_CorpseDrag(const EQApplicationPacket *app)
|
||||
{
|
||||
if (DraggedCorpses.size() >= (unsigned int)RuleI(Character, MaxDraggedCorpses))
|
||||
{
|
||||
Message_StringID(Chat::Red, CORPSEDRAG_LIMIT);
|
||||
MessageString(Chat::Red, CORPSEDRAG_LIMIT);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -4968,9 +4968,9 @@ void Client::Handle_OP_CorpseDrag(const EQApplicationPacket *app)
|
||||
if (c)
|
||||
{
|
||||
if (c == this)
|
||||
Message_StringID(Chat::DefaultText, CORPSEDRAG_ALREADY, corpse->GetCleanName());
|
||||
MessageString(Chat::DefaultText, CORPSEDRAG_ALREADY, corpse->GetCleanName());
|
||||
else
|
||||
Message_StringID(Chat::DefaultText, CORPSEDRAG_SOMEONE_ELSE, corpse->GetCleanName());
|
||||
MessageString(Chat::DefaultText, CORPSEDRAG_SOMEONE_ELSE, corpse->GetCleanName());
|
||||
|
||||
return;
|
||||
}
|
||||
@ -4980,14 +4980,14 @@ void Client::Handle_OP_CorpseDrag(const EQApplicationPacket *app)
|
||||
|
||||
DraggedCorpses.push_back(std::pair<std::string, uint16>(cds->CorpseName, corpse->GetID()));
|
||||
|
||||
Message_StringID(Chat::DefaultText, CORPSEDRAG_BEGIN, cds->CorpseName);
|
||||
MessageString(Chat::DefaultText, CORPSEDRAG_BEGIN, cds->CorpseName);
|
||||
}
|
||||
|
||||
void Client::Handle_OP_CorpseDrop(const EQApplicationPacket *app)
|
||||
{
|
||||
if (app->size == 1)
|
||||
{
|
||||
Message_StringID(Chat::DefaultText, CORPSEDRAG_STOPALL);
|
||||
MessageString(Chat::DefaultText, CORPSEDRAG_STOPALL);
|
||||
ClearDraggedCorpses();
|
||||
return;
|
||||
}
|
||||
@ -4996,7 +4996,7 @@ void Client::Handle_OP_CorpseDrop(const EQApplicationPacket *app)
|
||||
{
|
||||
if (!strcasecmp(Iterator->first.c_str(), (const char *)app->pBuffer))
|
||||
{
|
||||
Message_StringID(Chat::DefaultText, CORPSEDRAG_STOP);
|
||||
MessageString(Chat::DefaultText, CORPSEDRAG_STOP);
|
||||
Iterator = DraggedCorpses.erase(Iterator);
|
||||
return;
|
||||
}
|
||||
@ -5168,7 +5168,7 @@ void Client::Handle_OP_DeleteItem(const EQApplicationPacket *app)
|
||||
DeleteItem_Struct* alc = (DeleteItem_Struct*)app->pBuffer;
|
||||
const EQEmu::ItemInstance *inst = GetInv().GetItem(alc->from_slot);
|
||||
if (inst && inst->GetItem()->ItemType == EQEmu::item::ItemTypeAlcohol) {
|
||||
entity_list.MessageClose_StringID(this, true, 50, 0, DRINKING_MESSAGE, GetName(), inst->GetItem()->Name);
|
||||
entity_list.MessageCloseString(this, true, 50, 0, DRINKING_MESSAGE, GetName(), inst->GetItem()->Name);
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillAlcoholTolerance, nullptr, 25);
|
||||
|
||||
int16 AlcoholTolerance = GetSkill(EQEmu::skills::SkillAlcoholTolerance);
|
||||
@ -5300,7 +5300,7 @@ void Client::Handle_OP_Disarm(const EQApplicationPacket *app) {
|
||||
return;
|
||||
}
|
||||
// Trying to disarm something we can't disarm
|
||||
Message_StringID(Chat::Skills, DISARM_NO_TARGET);
|
||||
MessageString(Chat::Skills, DISARM_NO_TARGET);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -5358,14 +5358,14 @@ void Client::Handle_OP_DisarmTraps(const EQApplicationPacket *app)
|
||||
if ((zone->random.Int(0, 49) + uskill) >= (zone->random.Int(0, 49) + trap->skill))
|
||||
{
|
||||
success = SKILLUP_SUCCESS;
|
||||
Message_StringID(Chat::Skills, DISARMED_TRAP);
|
||||
MessageString(Chat::Skills, DISARMED_TRAP);
|
||||
trap->disarmed = true;
|
||||
Log(Logs::General, Logs::Traps, "Trap %d is disarmed.", trap->trap_id);
|
||||
trap->UpdateTrap();
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Skills, FAIL_DISARM_DETECTED_TRAP);
|
||||
MessageString(Chat::Skills, FAIL_DISARM_DETECTED_TRAP);
|
||||
if (zone->random.Int(0, 99) < 25) {
|
||||
trap->Trigger(this);
|
||||
}
|
||||
@ -5375,12 +5375,12 @@ void Client::Handle_OP_DisarmTraps(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Skills, TRAP_TOO_FAR);
|
||||
MessageString(Chat::Skills, TRAP_TOO_FAR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Skills, LDON_SENSE_TRAP2);
|
||||
MessageString(Chat::Skills, LDON_SENSE_TRAP2);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -5464,9 +5464,9 @@ void Client::Handle_OP_DuelResponse(const EQApplicationPacket *app)
|
||||
initiator->CastToClient()->SetDuelTarget(0);
|
||||
initiator->CastToClient()->SetDueling(false);
|
||||
if (GetID() == initiator->GetID())
|
||||
entity->CastToClient()->Message_StringID(Chat::NPCQuestSay, DUEL_DECLINE, initiator->GetName());
|
||||
entity->CastToClient()->MessageString(Chat::NPCQuestSay, DUEL_DECLINE, initiator->GetName());
|
||||
else
|
||||
initiator->CastToClient()->Message_StringID(Chat::NPCQuestSay, DUEL_DECLINE, entity->GetName());
|
||||
initiator->CastToClient()->MessageString(Chat::NPCQuestSay, DUEL_DECLINE, entity->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5690,7 +5690,7 @@ void Client::Handle_OP_FaceChange(const EQApplicationPacket *app)
|
||||
m_pp.drakkin_tattoo = fc->drakkin_tattoo;
|
||||
m_pp.drakkin_details = fc->drakkin_details;
|
||||
Save();
|
||||
Message_StringID(Chat::Red, FACE_ACCEPTED);
|
||||
MessageString(Chat::Red, FACE_ACCEPTED);
|
||||
//Message(Chat::Red, "Facial features updated.");
|
||||
return;
|
||||
}
|
||||
@ -5727,7 +5727,7 @@ void Client::Handle_OP_FeignDeath(const EQApplicationPacket *app)
|
||||
uint16 totalfeign = primfeign + secfeign;
|
||||
if (zone->random.Real(0, 160) > totalfeign) {
|
||||
SetFeigned(false);
|
||||
entity_list.MessageClose_StringID(this, false, 200, 10, STRING_FEIGNFAILED, GetName());
|
||||
entity_list.MessageCloseString(this, false, 200, 10, STRING_FEIGNFAILED, GetName());
|
||||
}
|
||||
else {
|
||||
SetFeigned(true);
|
||||
@ -5929,7 +5929,7 @@ void Client::Handle_OP_GMBecomeNPC(const EQApplicationPacket *app)
|
||||
cli->SendAppearancePacket(AT_NPCName, 1, true);
|
||||
cli->CastToClient()->SetBecomeNPC(true);
|
||||
cli->CastToClient()->SetBecomeNPCLevel(bnpc->maxlevel);
|
||||
cli->Message_StringID(Chat::White, TOGGLE_OFF);
|
||||
cli->MessageString(Chat::White, TOGGLE_OFF);
|
||||
cli->CastToClient()->tellsoff = true;
|
||||
//TODO: Make this toggle a BecomeNPC flag so that it gets updated when people zone in as well; Make combat work with this.
|
||||
return;
|
||||
@ -6336,13 +6336,13 @@ void Client::Handle_OP_GMToggle(const EQApplicationPacket *app)
|
||||
}
|
||||
GMToggle_Struct *ts = (GMToggle_Struct *)app->pBuffer;
|
||||
if (ts->toggle == 0) {
|
||||
this->Message_StringID(Chat::White, TOGGLE_OFF);
|
||||
this->MessageString(Chat::White, TOGGLE_OFF);
|
||||
//Message(0, "Turning tells OFF");
|
||||
tellsoff = true;
|
||||
}
|
||||
else if (ts->toggle == 1) {
|
||||
//Message(0, "Turning tells ON");
|
||||
this->Message_StringID(Chat::White, TOGGLE_ON);
|
||||
this->MessageString(Chat::White, TOGGLE_ON);
|
||||
tellsoff = false;
|
||||
}
|
||||
else {
|
||||
@ -6736,7 +6736,7 @@ void Client::Handle_OP_GroupInvite2(const EQApplicationPacket *app)
|
||||
|
||||
if (Invitee == this)
|
||||
{
|
||||
Message_StringID(Chat::LightGray, GROUP_INVITEE_SELF);
|
||||
MessageString(Chat::LightGray, GROUP_INVITEE_SELF);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -6974,7 +6974,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
||||
{
|
||||
if (GuildBanks->IsAreaFull(GuildID(), GuildBankMainArea))
|
||||
{
|
||||
Message_StringID(Chat::Red, GUILD_BANK_FULL);
|
||||
MessageString(Chat::Red, GUILD_BANK_FULL);
|
||||
|
||||
GuildBankDepositAck(true, sentAction);
|
||||
|
||||
@ -6991,7 +6991,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
||||
|
||||
if (inst)
|
||||
{
|
||||
Message_StringID(Chat::LightGray, GUILD_BANK_TRANSFERRED, inst->GetItem()->Name);
|
||||
MessageString(Chat::LightGray, GUILD_BANK_TRANSFERRED, inst->GetItem()->Name);
|
||||
safe_delete(inst);
|
||||
}
|
||||
}
|
||||
@ -7023,7 +7023,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
||||
{
|
||||
if (GuildBanks->IsAreaFull(GuildID(), GuildBankDepositArea))
|
||||
{
|
||||
Message_StringID(Chat::Red, GUILD_BANK_FULL);
|
||||
MessageString(Chat::Red, GUILD_BANK_FULL);
|
||||
|
||||
GuildBankDepositAck(true, sentAction);
|
||||
|
||||
@ -7068,7 +7068,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
||||
|
||||
if (!Allowed)
|
||||
{
|
||||
Message_StringID(Chat::Red, GUILD_BANK_CANNOT_DEPOSIT);
|
||||
MessageString(Chat::Red, GUILD_BANK_CANNOT_DEPOSIT);
|
||||
GuildBankDepositAck(true, sentAction);
|
||||
|
||||
return;
|
||||
@ -7101,7 +7101,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
||||
{
|
||||
if (GetInv()[EQEmu::invslot::slotCursor])
|
||||
{
|
||||
Message_StringID(Chat::Red, GUILD_BANK_EMPTY_HANDS);
|
||||
MessageString(Chat::Red, GUILD_BANK_EMPTY_HANDS);
|
||||
|
||||
GuildBankAck();
|
||||
|
||||
@ -7132,7 +7132,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
||||
|
||||
if (CheckLoreConflict(inst->GetItem()))
|
||||
{
|
||||
Message_StringID(Chat::Red, DUP_LORE);
|
||||
MessageString(Chat::Red, DUP_LORE);
|
||||
|
||||
GuildBankAck();
|
||||
|
||||
@ -7164,7 +7164,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
|
||||
case GuildBankSplitStacks:
|
||||
{
|
||||
if (GuildBanks->IsAreaFull(GuildID(), GuildBankMainArea))
|
||||
Message_StringID(Chat::Red, GUILD_BANK_FULL);
|
||||
MessageString(Chat::Red, GUILD_BANK_FULL);
|
||||
else
|
||||
{
|
||||
GuildBankWithdrawItem_Struct *gbwis = (GuildBankWithdrawItem_Struct*)app->pBuffer;
|
||||
@ -7257,7 +7257,7 @@ void Client::Handle_OP_GuildCreate(const EQApplicationPacket *app)
|
||||
|
||||
if (guild_mgr.GetGuildIDByName(GuildName) != GUILD_NONE)
|
||||
{
|
||||
Message_StringID(Chat::Red, GUILD_NAME_IN_USE);
|
||||
MessageString(Chat::Red, GUILD_NAME_IN_USE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7897,7 +7897,7 @@ void Client::Handle_OP_GuildStatus(const EQApplicationPacket *app)
|
||||
|
||||
if (!c)
|
||||
{
|
||||
Message_StringID(Chat::LightGray, TARGET_PLAYER_FOR_GUILD_STATUS);
|
||||
MessageString(Chat::LightGray, TARGET_PLAYER_FOR_GUILD_STATUS);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7905,7 +7905,7 @@ void Client::Handle_OP_GuildStatus(const EQApplicationPacket *app)
|
||||
|
||||
if (TargetGuildID == GUILD_NONE)
|
||||
{
|
||||
Message_StringID(Chat::LightGray, NOT_IN_A_GUILD, c->GetName());
|
||||
MessageString(Chat::LightGray, NOT_IN_A_GUILD, c->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7920,21 +7920,21 @@ void Client::Handle_OP_GuildStatus(const EQApplicationPacket *app)
|
||||
if ((TargetGuildID == GuildID()) && (c != this))
|
||||
{
|
||||
if (IsLeader)
|
||||
Message_StringID(Chat::LightGray, LEADER_OF_YOUR_GUILD, c->GetName());
|
||||
MessageString(Chat::LightGray, LEADER_OF_YOUR_GUILD, c->GetName());
|
||||
else if (IsOfficer)
|
||||
Message_StringID(Chat::LightGray, OFFICER_OF_YOUR_GUILD, c->GetName());
|
||||
MessageString(Chat::LightGray, OFFICER_OF_YOUR_GUILD, c->GetName());
|
||||
else
|
||||
Message_StringID(Chat::LightGray, MEMBER_OF_YOUR_GUILD, c->GetName());
|
||||
MessageString(Chat::LightGray, MEMBER_OF_YOUR_GUILD, c->GetName());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsLeader)
|
||||
Message_StringID(Chat::LightGray, LEADER_OF_X_GUILD, c->GetName(), GuildName);
|
||||
MessageString(Chat::LightGray, LEADER_OF_X_GUILD, c->GetName(), GuildName);
|
||||
else if (IsOfficer)
|
||||
Message_StringID(Chat::LightGray, OFFICER_OF_X_GUILD, c->GetName(), GuildName);
|
||||
MessageString(Chat::LightGray, OFFICER_OF_X_GUILD, c->GetName(), GuildName);
|
||||
else
|
||||
Message_StringID(Chat::LightGray, MEMBER_OF_X_GUILD, c->GetName(), GuildName);
|
||||
MessageString(Chat::LightGray, MEMBER_OF_X_GUILD, c->GetName(), GuildName);
|
||||
}
|
||||
|
||||
void Client::Handle_OP_GuildUpdateURLAndChannel(const EQApplicationPacket *app)
|
||||
@ -8537,7 +8537,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
|
||||
|
||||
if (IsAIControlled()) {
|
||||
this->Message_StringID(Chat::Red, NOT_IN_CONTROL);
|
||||
this->MessageString(Chat::Red, NOT_IN_CONTROL);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -8646,7 +8646,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
if (inst->GetCharges() == 0)
|
||||
{
|
||||
//Message(0, "This item is out of charges.");
|
||||
Message_StringID(Chat::Red, ITEM_OUT_OF_CHARGES);
|
||||
MessageString(Chat::Red, ITEM_OUT_OF_CHARGES);
|
||||
return;
|
||||
}
|
||||
if (GetLevel() >= item->Click.Level2)
|
||||
@ -8666,7 +8666,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Red, ITEMS_INSUFFICIENT_LEVEL);
|
||||
MessageString(Chat::Red, ITEMS_INSUFFICIENT_LEVEL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -8675,7 +8675,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
if (clickaug->GetCharges() == 0)
|
||||
{
|
||||
//Message(0, "This item is out of charges.");
|
||||
Message_StringID(Chat::Red, ITEM_OUT_OF_CHARGES);
|
||||
MessageString(Chat::Red, ITEM_OUT_OF_CHARGES);
|
||||
return;
|
||||
}
|
||||
if (GetLevel() >= augitem->Click.Level2)
|
||||
@ -8695,7 +8695,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Red, ITEMS_INSUFFICIENT_LEVEL);
|
||||
MessageString(Chat::Red, ITEMS_INSUFFICIENT_LEVEL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -8902,12 +8902,12 @@ void Client::Handle_OP_LeadershipExpToggle(const EQApplicationPacket *app)
|
||||
if (*mode) {
|
||||
m_pp.leadAAActive = 1;
|
||||
Save();
|
||||
Message_StringID(Chat::Yellow, LEADERSHIP_EXP_ON);
|
||||
MessageString(Chat::Yellow, LEADERSHIP_EXP_ON);
|
||||
}
|
||||
else {
|
||||
m_pp.leadAAActive = 0;
|
||||
Save();
|
||||
Message_StringID(Chat::Yellow, LEADERSHIP_EXP_OFF);
|
||||
MessageString(Chat::Yellow, LEADERSHIP_EXP_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9372,11 +9372,11 @@ void Client::Handle_OP_Mend(const EQApplicationPacket *app)
|
||||
|
||||
if (zone->random.Int(0, 99) < criticalchance) {
|
||||
mendhp *= 2;
|
||||
Message_StringID(Chat::LightBlue, MEND_CRITICAL);
|
||||
MessageString(Chat::LightBlue, MEND_CRITICAL);
|
||||
}
|
||||
SetHP(GetHP() + mendhp);
|
||||
SendHPUpdate();
|
||||
Message_StringID(Chat::LightBlue, MEND_SUCCESS);
|
||||
MessageString(Chat::LightBlue, MEND_SUCCESS);
|
||||
}
|
||||
else {
|
||||
/* the purpose of the following is to make the chance to worsen wounds much less common,
|
||||
@ -9389,10 +9389,10 @@ void Client::Handle_OP_Mend(const EQApplicationPacket *app)
|
||||
{
|
||||
SetHP(currenthp > mendhp ? (GetHP() - mendhp) : 1);
|
||||
SendHPUpdate();
|
||||
Message_StringID(Chat::LightBlue, MEND_WORSEN);
|
||||
MessageString(Chat::LightBlue, MEND_WORSEN);
|
||||
}
|
||||
else
|
||||
Message_StringID(Chat::LightBlue, MEND_FAIL);
|
||||
MessageString(Chat::LightBlue, MEND_FAIL);
|
||||
}
|
||||
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillMend, nullptr, 10);
|
||||
@ -9930,9 +9930,9 @@ void Client::Handle_OP_PDeletePetition(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
if (petition_list.DeletePetitionByCharName((char*)app->pBuffer))
|
||||
Message_StringID(Chat::White, PETITION_DELETED);
|
||||
MessageString(Chat::White, PETITION_DELETED);
|
||||
else
|
||||
Message_StringID(Chat::White, PETITION_NO_DELETE);
|
||||
MessageString(Chat::White, PETITION_NO_DELETE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -9989,7 +9989,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (!target)
|
||||
break;
|
||||
if (target->IsMezzed()) {
|
||||
Message_StringID(Chat::NPCQuestSay, CANNOT_WAKE, mypet->GetCleanName(), target->GetCleanName());
|
||||
MessageString(Chat::NPCQuestSay, CANNOT_WAKE, mypet->GetCleanName(), target->GetCleanName());
|
||||
break;
|
||||
}
|
||||
if (mypet->IsFeared())
|
||||
@ -10027,7 +10027,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
hate += mypet->GetHateAmount(top) - mypet->GetHateAmount(target) + 100; // should be enough to cause target change
|
||||
}
|
||||
mypet->AddToHateList(target, hate, 0, true, false, false, SPELL_UNKNOWN, true);
|
||||
Message_StringID(Chat::PetResponse, PET_ATTACKING, mypet->GetCleanName(), target->GetCleanName());
|
||||
MessageString(Chat::PetResponse, PET_ATTACKING, mypet->GetCleanName(), target->GetCleanName());
|
||||
SetTarget(target);
|
||||
}
|
||||
}
|
||||
@ -10040,7 +10040,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (!GetTarget())
|
||||
break;
|
||||
if (GetTarget()->IsMezzed()) {
|
||||
Message_StringID(Chat::NPCQuestSay, CANNOT_WAKE, mypet->GetCleanName(), GetTarget()->GetCleanName());
|
||||
MessageString(Chat::NPCQuestSay, CANNOT_WAKE, mypet->GetCleanName(), GetTarget()->GetCleanName());
|
||||
break;
|
||||
}
|
||||
|
||||
@ -10061,7 +10061,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
}
|
||||
zone->AddAggroMob();
|
||||
mypet->AddToHateList(GetTarget(), 1, 0, true, false, false, SPELL_UNKNOWN, true);
|
||||
Message_StringID(Chat::PetResponse, PET_ATTACKING, mypet->GetCleanName(), GetTarget()->GetCleanName());
|
||||
MessageString(Chat::PetResponse, PET_ATTACKING, mypet->GetCleanName(), GetTarget()->GetCleanName());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -10082,7 +10082,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
}
|
||||
case PET_HEALTHREPORT: {
|
||||
if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) {
|
||||
Message_StringID(Chat::PetResponse, PET_REPORT_HP, ConvertArrayF(mypet->GetHPRatio(), val1));
|
||||
MessageString(Chat::PetResponse, PET_REPORT_HP, ConvertArrayF(mypet->GetHPRatio(), val1));
|
||||
mypet->ShowBuffList(this);
|
||||
}
|
||||
break;
|
||||
@ -10150,12 +10150,12 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) {
|
||||
if (mypet->CastToNPC()->IsTaunting())
|
||||
{
|
||||
Message_StringID(Chat::PetResponse, PET_NO_TAUNT);
|
||||
MessageString(Chat::PetResponse, PET_NO_TAUNT);
|
||||
mypet->CastToNPC()->SetTaunting(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::PetResponse, PET_DO_TAUNT);
|
||||
MessageString(Chat::PetResponse, PET_DO_TAUNT);
|
||||
mypet->CastToNPC()->SetTaunting(true);
|
||||
}
|
||||
}
|
||||
@ -10163,14 +10163,14 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
}
|
||||
case PET_TAUNT_ON: {
|
||||
if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) {
|
||||
Message_StringID(Chat::PetResponse, PET_DO_TAUNT);
|
||||
MessageString(Chat::PetResponse, PET_DO_TAUNT);
|
||||
mypet->CastToNPC()->SetTaunting(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PET_TAUNT_OFF: {
|
||||
if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) {
|
||||
Message_StringID(Chat::PetResponse, PET_NO_TAUNT);
|
||||
MessageString(Chat::PetResponse, PET_NO_TAUNT);
|
||||
mypet->CastToNPC()->SetTaunting(false);
|
||||
}
|
||||
break;
|
||||
@ -10239,13 +10239,13 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsHeld())
|
||||
{
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_HOLD_SET_OFF);
|
||||
MessageString(Chat::PetResponse, PET_HOLD_SET_OFF);
|
||||
mypet->SetHeld(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_HOLD_SET_ON);
|
||||
MessageString(Chat::PetResponse, PET_HOLD_SET_ON);
|
||||
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater)
|
||||
mypet->SayTo_StringID(this, Chat::PetResponse, PET_NOW_HOLDING);
|
||||
@ -10262,7 +10262,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
case PET_HOLD_ON: {
|
||||
if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC() && !mypet->IsHeld()) {
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_HOLD_SET_ON);
|
||||
MessageString(Chat::PetResponse, PET_HOLD_SET_ON);
|
||||
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater)
|
||||
mypet->SayTo_StringID(this, Chat::PetResponse, PET_NOW_HOLDING);
|
||||
@ -10277,7 +10277,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
case PET_HOLD_OFF: {
|
||||
if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC() && mypet->IsHeld()) {
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_HOLD_SET_OFF);
|
||||
MessageString(Chat::PetResponse, PET_HOLD_SET_OFF);
|
||||
mypet->SetHeld(false);
|
||||
}
|
||||
break;
|
||||
@ -10287,13 +10287,13 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsGHeld())
|
||||
{
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_OFF_GHOLD);
|
||||
MessageString(Chat::PetResponse, PET_OFF_GHOLD);
|
||||
mypet->SetGHeld(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) {
|
||||
Message_StringID(Chat::PetResponse, PET_ON_GHOLD);
|
||||
MessageString(Chat::PetResponse, PET_ON_GHOLD);
|
||||
mypet->SayTo_StringID(this, Chat::PetResponse, PET_GHOLD_ON_MSG);
|
||||
} else {
|
||||
mypet->SayTo_StringID(this, Chat::PetResponse, PET_ON_HOLD);
|
||||
@ -10308,7 +10308,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
case PET_GHOLD_ON: {
|
||||
if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC()) {
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater) {
|
||||
Message_StringID(Chat::PetResponse, PET_ON_GHOLD);
|
||||
MessageString(Chat::PetResponse, PET_ON_GHOLD);
|
||||
mypet->SayTo_StringID(this, Chat::PetResponse, PET_GHOLD_ON_MSG);
|
||||
} else {
|
||||
mypet->SayTo_StringID(this, Chat::PetResponse, PET_ON_HOLD);
|
||||
@ -10322,7 +10322,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
case PET_GHOLD_OFF: {
|
||||
if (aabonuses.PetCommands[PetCommand] && mypet->IsNPC() && mypet->IsGHeld()) {
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskUFAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_OFF_GHOLD);
|
||||
MessageString(Chat::PetResponse, PET_OFF_GHOLD);
|
||||
mypet->SetGHeld(false);
|
||||
}
|
||||
break;
|
||||
@ -10332,15 +10332,15 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsFeared())
|
||||
break;
|
||||
if (mypet->IsNoCast()) {
|
||||
Message_StringID(Chat::PetResponse, PET_CASTING);
|
||||
MessageString(Chat::PetResponse, PET_CASTING);
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_SPELLHOLD_SET_OFF);
|
||||
MessageString(Chat::PetResponse, PET_SPELLHOLD_SET_OFF);
|
||||
mypet->SetNoCast(false);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::PetResponse, PET_NOT_CASTING);
|
||||
MessageString(Chat::PetResponse, PET_NOT_CASTING);
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_SPELLHOLD_SET_ON);
|
||||
MessageString(Chat::PetResponse, PET_SPELLHOLD_SET_ON);
|
||||
mypet->SetNoCast(true);
|
||||
}
|
||||
}
|
||||
@ -10351,9 +10351,9 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsFeared())
|
||||
break;
|
||||
if (!mypet->IsNoCast()) {
|
||||
Message_StringID(Chat::PetResponse, PET_NOT_CASTING);
|
||||
MessageString(Chat::PetResponse, PET_NOT_CASTING);
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_SPELLHOLD_SET_ON);
|
||||
MessageString(Chat::PetResponse, PET_SPELLHOLD_SET_ON);
|
||||
mypet->SetNoCast(true);
|
||||
}
|
||||
}
|
||||
@ -10364,9 +10364,9 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsFeared())
|
||||
break;
|
||||
if (mypet->IsNoCast()) {
|
||||
Message_StringID(Chat::PetResponse, PET_CASTING);
|
||||
MessageString(Chat::PetResponse, PET_CASTING);
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_SPELLHOLD_SET_OFF);
|
||||
MessageString(Chat::PetResponse, PET_SPELLHOLD_SET_OFF);
|
||||
mypet->SetNoCast(false);
|
||||
}
|
||||
}
|
||||
@ -10377,15 +10377,15 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsFeared())
|
||||
break;
|
||||
if (mypet->IsFocused()) {
|
||||
Message_StringID(Chat::PetResponse, PET_NOT_FOCUSING);
|
||||
MessageString(Chat::PetResponse, PET_NOT_FOCUSING);
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_FOCUS_SET_OFF);
|
||||
MessageString(Chat::PetResponse, PET_FOCUS_SET_OFF);
|
||||
mypet->SetFocused(false);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::PetResponse, PET_NOW_FOCUSING);
|
||||
MessageString(Chat::PetResponse, PET_NOW_FOCUSING);
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_FOCUS_SET_ON);
|
||||
MessageString(Chat::PetResponse, PET_FOCUS_SET_ON);
|
||||
mypet->SetFocused(true);
|
||||
}
|
||||
}
|
||||
@ -10396,9 +10396,9 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsFeared())
|
||||
break;
|
||||
if (!mypet->IsFocused()) {
|
||||
Message_StringID(Chat::PetResponse, PET_NOW_FOCUSING);
|
||||
MessageString(Chat::PetResponse, PET_NOW_FOCUSING);
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_FOCUS_SET_ON);
|
||||
MessageString(Chat::PetResponse, PET_FOCUS_SET_ON);
|
||||
mypet->SetFocused(true);
|
||||
}
|
||||
}
|
||||
@ -10409,9 +10409,9 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
if (mypet->IsFeared())
|
||||
break;
|
||||
if (mypet->IsFocused()) {
|
||||
Message_StringID(Chat::PetResponse, PET_NOT_FOCUSING);
|
||||
MessageString(Chat::PetResponse, PET_NOT_FOCUSING);
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoDAndLater)
|
||||
Message_StringID(Chat::PetResponse, PET_FOCUS_SET_OFF);
|
||||
MessageString(Chat::PetResponse, PET_FOCUS_SET_OFF);
|
||||
mypet->SetFocused(false);
|
||||
}
|
||||
}
|
||||
@ -11111,7 +11111,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
Client *player_accepting_invite = entity_list.GetClientByName(raid_command_packet->player_name);
|
||||
if (player_accepting_invite) {
|
||||
if (IsRaidGrouped()) {
|
||||
player_accepting_invite->Message_StringID(Chat::White, ALREADY_IN_RAID, GetName()); //group failed, must invite members not in raid...
|
||||
player_accepting_invite->MessageString(Chat::White, ALREADY_IN_RAID, GetName()); //group failed, must invite members not in raid...
|
||||
return;
|
||||
}
|
||||
Raid *raid = entity_list.GetRaidByClient(player_accepting_invite);
|
||||
@ -11983,14 +11983,14 @@ void Client::Handle_OP_RemoveTrap(const EQApplicationPacket *app)
|
||||
if (good)
|
||||
RemoveAura(id);
|
||||
else
|
||||
Message_StringID(Chat::SpellFailure, NOT_YOUR_TRAP); // pretty sure this was red
|
||||
MessageString(Chat::SpellFailure, NOT_YOUR_TRAP); // pretty sure this was red
|
||||
}
|
||||
|
||||
void Client::Handle_OP_Report(const EQApplicationPacket *app)
|
||||
{
|
||||
if (!CanUseReport)
|
||||
{
|
||||
Message_StringID(Chat::System, REPORT_ONCE);
|
||||
MessageString(Chat::System, REPORT_ONCE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -12057,11 +12057,11 @@ void Client::Handle_OP_RequestDuel(const EQApplicationPacket *app)
|
||||
ds->duel_target = duel;
|
||||
Entity* entity = entity_list.GetID(ds->duel_target);
|
||||
if (GetID() != ds->duel_target && entity->IsClient() && (entity->CastToClient()->IsDueling() && entity->CastToClient()->GetDuelTarget() != 0)) {
|
||||
Message_StringID(Chat::NPCQuestSay, DUEL_CONSIDERING, entity->GetName());
|
||||
MessageString(Chat::NPCQuestSay, DUEL_CONSIDERING, entity->GetName());
|
||||
return;
|
||||
}
|
||||
if (IsDueling()) {
|
||||
Message_StringID(Chat::NPCQuestSay, DUEL_INPROGRESS);
|
||||
MessageString(Chat::NPCQuestSay, DUEL_INPROGRESS);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -12108,7 +12108,7 @@ void Client::Handle_OP_RespawnWindow(const EQApplicationPacket *app)
|
||||
void Client::Handle_OP_Rewind(const EQApplicationPacket *app)
|
||||
{
|
||||
if ((rewind_timer.GetRemainingTime() > 1 && rewind_timer.Enabled())) {
|
||||
Message_StringID(Chat::System, REWIND_WAIT);
|
||||
MessageString(Chat::System, REWIND_WAIT);
|
||||
}
|
||||
else {
|
||||
CastToClient()->MovePC(zone->GetZoneID(), zone->GetInstanceID(), m_RewindLocation.x, m_RewindLocation.y, m_RewindLocation.z, 0, 2, Rewind);
|
||||
@ -12445,7 +12445,8 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
|
||||
|
||||
if (shield_target)
|
||||
{
|
||||
entity_list.MessageClose_StringID(this, false, 100, 0,
|
||||
entity_list.MessageCloseString(
|
||||
this, false, 100, 0,
|
||||
END_SHIELDING, GetName(), shield_target->GetName());
|
||||
for (int y = 0; y < 2; y++)
|
||||
{
|
||||
@ -12471,7 +12472,8 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
|
||||
{
|
||||
if (shield_target->shielder[x].shielder_id == 0)
|
||||
{
|
||||
entity_list.MessageClose_StringID(this, false, 100, 0,
|
||||
entity_list.MessageCloseString(
|
||||
this, false, 100, 0,
|
||||
START_SHIELDING, GetName(), shield_target->GetName());
|
||||
shield_target->shielder[x].shielder_id = GetID();
|
||||
int shieldbonus = shield->AC * 2;
|
||||
@ -12509,7 +12511,7 @@ void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
|
||||
}
|
||||
if (!ack)
|
||||
{
|
||||
Message_StringID(Chat::White, ALREADY_SHIELDED);
|
||||
MessageString(Chat::White, ALREADY_SHIELDED);
|
||||
shield_target = 0;
|
||||
return;
|
||||
}
|
||||
@ -13021,7 +13023,7 @@ void Client::Handle_OP_ShopRequest(const EQApplicationPacket *app)
|
||||
return;
|
||||
}
|
||||
if (tmp->IsEngaged()) {
|
||||
this->Message_StringID(Chat::White, MERCHANT_BUSY);
|
||||
this->MessageString(Chat::White, MERCHANT_BUSY);
|
||||
action = 0;
|
||||
}
|
||||
if (GetFeigned() || IsInvisible())
|
||||
@ -13334,7 +13336,7 @@ void Client::Handle_OP_Surname(const EQApplicationPacket *app)
|
||||
|
||||
if (GetLevel() < 20)
|
||||
{
|
||||
Message_StringID(Chat::Yellow, SURNAME_LEVEL);
|
||||
MessageString(Chat::Yellow, SURNAME_LEVEL);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -13356,13 +13358,13 @@ void Client::Handle_OP_Surname(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
if (strlen(surname->lastname) >= 20) {
|
||||
Message_StringID(Chat::Yellow, SURNAME_TOO_LONG);
|
||||
MessageString(Chat::Yellow, SURNAME_TOO_LONG);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!database.CheckNameFilter(surname->lastname, true))
|
||||
{
|
||||
Message_StringID(Chat::Yellow, SURNAME_REJECTED);
|
||||
MessageString(Chat::Yellow, SURNAME_REJECTED);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -13742,16 +13744,16 @@ void Client::Handle_OP_TradeAcceptClick(const EQApplicationPacket *app)
|
||||
trade->state = TradeCompleting;
|
||||
|
||||
if (CheckTradeLoreConflict(other) || other->CheckTradeLoreConflict(this)) {
|
||||
Message_StringID(Chat::Red, TRADE_CANCEL_LORE);
|
||||
other->Message_StringID(Chat::Red, TRADE_CANCEL_LORE);
|
||||
MessageString(Chat::Red, TRADE_CANCEL_LORE);
|
||||
other->MessageString(Chat::Red, TRADE_CANCEL_LORE);
|
||||
this->FinishTrade(this);
|
||||
other->FinishTrade(other);
|
||||
other->trade->Reset();
|
||||
trade->Reset();
|
||||
}
|
||||
else if (CheckTradeNonDroppable()) {
|
||||
Message_StringID(Chat::Red, TRADE_HAS_BEEN_CANCELLED);
|
||||
other->Message_StringID(Chat::Red, TRADE_HAS_BEEN_CANCELLED);
|
||||
MessageString(Chat::Red, TRADE_HAS_BEEN_CANCELLED);
|
||||
other->MessageString(Chat::Red, TRADE_HAS_BEEN_CANCELLED);
|
||||
this->FinishTrade(this);
|
||||
other->FinishTrade(other);
|
||||
other->trade->Reset();
|
||||
@ -13760,8 +13762,8 @@ void Client::Handle_OP_TradeAcceptClick(const EQApplicationPacket *app)
|
||||
// TODO: query (this) as a hacker
|
||||
}
|
||||
else if (other->CheckTradeNonDroppable()) {
|
||||
Message_StringID(Chat::Red, TRADE_HAS_BEEN_CANCELLED);
|
||||
other->Message_StringID(Chat::Red, TRADE_HAS_BEEN_CANCELLED);
|
||||
MessageString(Chat::Red, TRADE_HAS_BEEN_CANCELLED);
|
||||
other->MessageString(Chat::Red, TRADE_HAS_BEEN_CANCELLED);
|
||||
this->FinishTrade(this);
|
||||
other->FinishTrade(other);
|
||||
other->trade->Reset();
|
||||
@ -14209,7 +14211,7 @@ void Client::Handle_OP_TraderShop(const EQApplicationPacket *app)
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Yellow, TRADER_BUSY);
|
||||
MessageString(Chat::Yellow, TRADER_BUSY);
|
||||
Log(Logs::Detail, Logs::Trading, "Client::Handle_OP_TraderShop: Trader Busy");
|
||||
}
|
||||
|
||||
|
||||
@ -378,10 +378,10 @@ bool Client::Process() {
|
||||
}
|
||||
|
||||
if (!CombatRange(auto_attack_target)) {
|
||||
Message_StringID(Chat::TooFarAway, TARGET_TOO_FAR);
|
||||
MessageString(Chat::TooFarAway, TARGET_TOO_FAR);
|
||||
}
|
||||
else if (auto_attack_target == this) {
|
||||
Message_StringID(Chat::TooFarAway, TRY_ATTACKING_SOMEONE);
|
||||
MessageString(Chat::TooFarAway, TRY_ATTACKING_SOMEONE);
|
||||
}
|
||||
else if (!los_status || !los_status_facing) {
|
||||
//you can't see your target
|
||||
@ -401,11 +401,11 @@ bool Client::Process() {
|
||||
|
||||
if (GetClass() == WARRIOR || GetClass() == BERSERKER) {
|
||||
if (!dead && !IsBerserk() && GetHPRatio() < RuleI(Combat, BerserkerFrenzyStart)) {
|
||||
entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_START, GetName());
|
||||
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_START, GetName());
|
||||
berserk = true;
|
||||
}
|
||||
if (IsBerserk() && GetHPRatio() > RuleI(Combat, BerserkerFrenzyEnd)) {
|
||||
entity_list.MessageClose_StringID(this, false, 200, 0, BERSERK_END, GetName());
|
||||
entity_list.MessageCloseString(this, false, 200, 0, BERSERK_END, GetName());
|
||||
berserk = false;
|
||||
}
|
||||
}
|
||||
@ -416,11 +416,11 @@ bool Client::Process() {
|
||||
// Range check
|
||||
if (!CombatRange(auto_attack_target)) {
|
||||
// this is a duplicate message don't use it.
|
||||
//Message_StringID(Chat::TooFarAway,TARGET_TOO_FAR);
|
||||
//MessageString(Chat::TooFarAway,TARGET_TOO_FAR);
|
||||
}
|
||||
// Don't attack yourself
|
||||
else if (auto_attack_target == this) {
|
||||
//Message_StringID(Chat::TooFarAway,TRY_ATTACKING_SOMEONE);
|
||||
//MessageString(Chat::TooFarAway,TRY_ATTACKING_SOMEONE);
|
||||
}
|
||||
else if (!los_status || !los_status_facing)
|
||||
{
|
||||
@ -465,7 +465,8 @@ bool Client::Process() {
|
||||
{
|
||||
if (!CombatRange(shield_target))
|
||||
{
|
||||
entity_list.MessageClose_StringID(this, false, 100, 0,
|
||||
entity_list.MessageCloseString(
|
||||
this, false, 100, 0,
|
||||
END_SHIELDING, GetCleanName(), shield_target->GetCleanName());
|
||||
for (int y = 0; y < 2; y++)
|
||||
{
|
||||
@ -951,9 +952,9 @@ void Client::BulkSendMerchantInventory(int merchant_id, int npcid) {
|
||||
sprintf(handy_id, "%i", greet_id);
|
||||
|
||||
if (greet_id != MERCHANT_GREETING)
|
||||
Message_StringID(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, merch->GetCleanName(), handy_id, this->GetName(), handyitem->Name);
|
||||
MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, merch->GetCleanName(), handy_id, this->GetName(), handyitem->Name);
|
||||
else
|
||||
Message_StringID(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, merch->GetCleanName(), handy_id, this->GetName());
|
||||
MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, merch->GetCleanName(), handy_id, this->GetName());
|
||||
}
|
||||
|
||||
// safe_delete_array(cpi);
|
||||
@ -1043,7 +1044,7 @@ void Client::OPTGB(const EQApplicationPacket *app)
|
||||
|
||||
uint32 tgb_flag = *(uint32 *)app->pBuffer;
|
||||
if(tgb_flag == 2)
|
||||
Message_StringID(Chat::White, TGB() ? TGB_ON : TGB_OFF);
|
||||
MessageString(Chat::White, TGB() ? TGB_ON : TGB_OFF);
|
||||
else
|
||||
tgb = tgb_flag;
|
||||
}
|
||||
@ -1072,7 +1073,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
||||
)
|
||||
{
|
||||
char val1[20]={0};
|
||||
Message_StringID(Chat::Red,SPELL_LEVEL_TO_LOW,ConvertArray(spells[memspell->spell_id].classes[GetClass()-1],val1),spells[memspell->spell_id].name);
|
||||
MessageString(Chat::Red,SPELL_LEVEL_TO_LOW,ConvertArray(spells[memspell->spell_id].classes[GetClass()-1],val1),spells[memspell->spell_id].name);
|
||||
//Message(Chat::Red, "Unexpected error: Class cant use this spell at your level!");
|
||||
return;
|
||||
}
|
||||
@ -1087,7 +1088,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
||||
const EQEmu::ItemData* item = inst->GetItem();
|
||||
|
||||
if (RuleB(Character, RestrictSpellScribing) && !item->IsEquipable(GetRace(), GetClass())) {
|
||||
Message_StringID(Chat::Red, CANNOT_USE_ITEM);
|
||||
MessageString(Chat::Red, CANNOT_USE_ITEM);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1645,7 +1646,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
||||
case EQEmu::skills::SkillJewelryMaking:
|
||||
case EQEmu::skills::SkillPottery:
|
||||
if(skilllevel >= RuleI(Skills, MaxTrainTradeskills)) {
|
||||
Message_StringID(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
|
||||
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -1655,7 +1656,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
||||
case EQEmu::skills::SkillSpecializeDivination:
|
||||
case EQEmu::skills::SkillSpecializeEvocation:
|
||||
if(skilllevel >= RuleI(Skills, MaxTrainSpecializations)) {
|
||||
Message_StringID(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
|
||||
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
|
||||
return;
|
||||
}
|
||||
default:
|
||||
@ -1666,7 +1667,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
||||
if (skilllevel >= MaxSkillValue)
|
||||
{
|
||||
// Don't allow training over max skill level
|
||||
Message_StringID(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
|
||||
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1676,7 +1677,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
|
||||
if (skilllevel >= MaxSpecSkill)
|
||||
{
|
||||
// Restrict specialization training to follow the rules
|
||||
Message_StringID(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
|
||||
MessageString(Chat::Red, MORE_SKILLED_THAN_I, pTrainer->GetCleanName());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1919,7 +1920,7 @@ void Client::DoTracking()
|
||||
Mob *m = entity_list.GetMob(TrackingID);
|
||||
|
||||
if (!m || m->IsCorpse()) {
|
||||
Message_StringID(Chat::Skills, TRACK_LOST_TARGET);
|
||||
MessageString(Chat::Skills, TRACK_LOST_TARGET);
|
||||
TrackingID = 0;
|
||||
return;
|
||||
}
|
||||
@ -1930,23 +1931,23 @@ void Client::DoTracking()
|
||||
RelativeHeading += 512;
|
||||
|
||||
if (RelativeHeading > 480)
|
||||
Message_StringID(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
|
||||
MessageString(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
|
||||
else if (RelativeHeading > 416)
|
||||
Message_StringID(Chat::Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "left");
|
||||
MessageString(Chat::Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "left");
|
||||
else if (RelativeHeading > 352)
|
||||
Message_StringID(Chat::Skills, TRACK_TO_THE, m->GetCleanName(), "left");
|
||||
MessageString(Chat::Skills, TRACK_TO_THE, m->GetCleanName(), "left");
|
||||
else if (RelativeHeading > 288)
|
||||
Message_StringID(Chat::Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "left");
|
||||
MessageString(Chat::Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "left");
|
||||
else if (RelativeHeading > 224)
|
||||
Message_StringID(Chat::Skills, TRACK_BEHIND_YOU, m->GetCleanName());
|
||||
MessageString(Chat::Skills, TRACK_BEHIND_YOU, m->GetCleanName());
|
||||
else if (RelativeHeading > 160)
|
||||
Message_StringID(Chat::Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "right");
|
||||
MessageString(Chat::Skills, TRACK_BEHIND_AND_TO, m->GetCleanName(), "right");
|
||||
else if (RelativeHeading > 96)
|
||||
Message_StringID(Chat::Skills, TRACK_TO_THE, m->GetCleanName(), "right");
|
||||
MessageString(Chat::Skills, TRACK_TO_THE, m->GetCleanName(), "right");
|
||||
else if (RelativeHeading > 32)
|
||||
Message_StringID(Chat::Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "right");
|
||||
MessageString(Chat::Skills, TRACK_AHEAD_AND_TO, m->GetCleanName(), "right");
|
||||
else if (RelativeHeading >= 0)
|
||||
Message_StringID(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
|
||||
MessageString(Chat::Skills, TRACK_STRAIGHT_AHEAD, m->GetCleanName());
|
||||
}
|
||||
|
||||
void Client::HandleRespawnFromHover(uint32 Option)
|
||||
|
||||
@ -1201,7 +1201,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
|
||||
|
||||
if (client && inst) {
|
||||
if (client->CheckLoreConflict(item)) {
|
||||
client->Message_StringID(Chat::White, LOOT_LORE_ERROR);
|
||||
client->MessageString(Chat::White, LOOT_LORE_ERROR);
|
||||
client->QueuePacket(app);
|
||||
SendEndLootErrorPacket(client);
|
||||
ResetLooter();
|
||||
@ -1214,7 +1214,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
|
||||
EQEmu::ItemInstance *itm = inst->GetAugment(i);
|
||||
if (itm) {
|
||||
if (client->CheckLoreConflict(itm->GetItem())) {
|
||||
client->Message_StringID(Chat::White, LOOT_LORE_ERROR);
|
||||
client->MessageString(Chat::White, LOOT_LORE_ERROR);
|
||||
client->QueuePacket(app);
|
||||
SendEndLootErrorPacket(client);
|
||||
ResetLooter();
|
||||
@ -1236,7 +1236,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
|
||||
args.push_back(this);
|
||||
if (parse->EventPlayer(EVENT_LOOT, client, buf, 0, &args) != 0) {
|
||||
lootitem->auto_loot = -1;
|
||||
client->Message_StringID(Chat::Red, LOOT_NOT_ALLOWED, inst->GetItem()->Name);
|
||||
client->MessageString(Chat::Red, LOOT_NOT_ALLOWED, inst->GetItem()->Name);
|
||||
client->QueuePacket(app);
|
||||
delete inst;
|
||||
return;
|
||||
@ -1312,18 +1312,18 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
|
||||
|
||||
linker.GenerateLink();
|
||||
|
||||
client->Message_StringID(Chat::Loot, LOOTED_MESSAGE, linker.Link().c_str());
|
||||
client->MessageString(Chat::Loot, LOOTED_MESSAGE, linker.Link().c_str());
|
||||
|
||||
if (!IsPlayerCorpse()) {
|
||||
Group *g = client->GetGroup();
|
||||
if (g != nullptr) {
|
||||
g->GroupMessage_StringID(client, Chat::Loot, OTHER_LOOTED_MESSAGE,
|
||||
g->GroupMessageString(client, Chat::Loot, OTHER_LOOTED_MESSAGE,
|
||||
client->GetName(), linker.Link().c_str());
|
||||
}
|
||||
else {
|
||||
Raid *r = client->GetRaid();
|
||||
if (r != nullptr) {
|
||||
r->RaidMessage_StringID(client, Chat::Loot, OTHER_LOOTED_MESSAGE,
|
||||
r->RaidMessageString(client, Chat::Loot, OTHER_LOOTED_MESSAGE,
|
||||
client->GetName(), linker.Link().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
if (RuleI(Adventure, ItemIDToEnablePorts) != 0) {
|
||||
if (!sender->KeyRingCheck(RuleI(Adventure, ItemIDToEnablePorts))) {
|
||||
if (sender->GetInv().HasItem(RuleI(Adventure, ItemIDToEnablePorts)) == INVALID_INDEX) {
|
||||
sender->Message_StringID(Chat::Red, DUNGEON_SEALED);
|
||||
sender->MessageString(Chat::Red, DUNGEON_SEALED);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
} else {
|
||||
@ -281,7 +281,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
* GM can always open locks
|
||||
*/
|
||||
if (sender->GetGM()) {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_GM);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_GM);
|
||||
|
||||
if (!IsDoorOpen() || (open_type == 58)) {
|
||||
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? OPEN_DOOR : OPEN_INVDOOR);
|
||||
@ -333,19 +333,19 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
} else {
|
||||
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
|
||||
}
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_SUCCESSFUL_PICK);
|
||||
} else {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_INSUFFICIENT_SKILL);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_NO_PICK);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_NO_PICK);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_CANT_PICK);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_CANT_PICK);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
@ -368,7 +368,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
move_door_packet->action = static_cast<uint8>(invert_state == 0 ? CLOSE_DOOR : CLOSE_INVDOOR);
|
||||
}
|
||||
} else {
|
||||
sender->Message_StringID(Chat::LightBlue, DOORS_LOCKED);
|
||||
sender->MessageString(Chat::LightBlue, DOORS_LOCKED);
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -122,11 +122,12 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
else if (IsNPC() && CastToNPC()->GetSpellScale())
|
||||
value = int(static_cast<float>(value) * CastToNPC()->GetSpellScale() / 100.0f);
|
||||
|
||||
entity_list.MessageClose_StringID(this, true, 100, Chat::SpellCrit,
|
||||
OTHER_CRIT_BLAST, GetName(), itoa(-value));
|
||||
entity_list.MessageCloseString(
|
||||
this, true, 100, Chat::SpellCrit,
|
||||
OTHER_CRIT_BLAST, GetName(), itoa(-value));
|
||||
|
||||
if (IsClient())
|
||||
Message_StringID(Chat::SpellCrit, YOU_CRIT_BLAST, itoa(-value));
|
||||
MessageString(Chat::SpellCrit, YOU_CRIT_BLAST, itoa(-value));
|
||||
|
||||
return value;
|
||||
}
|
||||
@ -306,11 +307,12 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
value = int(static_cast<float>(value) * CastToNPC()->GetHealScale() / 100.0f);
|
||||
|
||||
if (Critical) {
|
||||
entity_list.MessageClose_StringID(this, true, 100, Chat::SpellCrit,
|
||||
OTHER_CRIT_HEAL, GetName(), itoa(value));
|
||||
entity_list.MessageCloseString(
|
||||
this, true, 100, Chat::SpellCrit,
|
||||
OTHER_CRIT_HEAL, GetName(), itoa(value));
|
||||
|
||||
if (IsClient())
|
||||
Message_StringID(Chat::SpellCrit, YOU_CRIT_HEAL, itoa(value));
|
||||
MessageString(Chat::SpellCrit, YOU_CRIT_HEAL, itoa(value));
|
||||
}
|
||||
|
||||
return value;
|
||||
@ -595,7 +597,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
}
|
||||
|
||||
if(level_to_use > GetLevel()) {
|
||||
Message_StringID(Chat::Red, DISC_LEVEL_USE_ERROR);
|
||||
MessageString(Chat::Red, DISC_LEVEL_USE_ERROR);
|
||||
//should summon them a new one...
|
||||
return(false);
|
||||
}
|
||||
@ -607,7 +609,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
|
||||
// sneak attack discs require you to be hidden for 4 seconds before use
|
||||
if (spell.sneak && (!hidden || (hidden && (Timer::GetCurrentTime() - tmHidden) < 4000))) {
|
||||
Message_StringID(Chat::SpellFailure, SNEAK_RESTRICT);
|
||||
MessageString(Chat::SpellFailure, SNEAK_RESTRICT);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -621,7 +623,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
/*char val1[20]={0};*/ //unused
|
||||
/*char val2[20]={0};*/ //unused
|
||||
uint32 remain = p_timers.GetRemainingTime(DiscTimer);
|
||||
//Message_StringID(Chat::WhiteSmoke, DISCIPLINE_CANUSEIN, ConvertArray((remain)/60,val1), ConvertArray(remain%60,val2));
|
||||
//MessageString(Chat::WhiteSmoke, DISCIPLINE_CANUSEIN, ConvertArray((remain)/60,val1), ConvertArray(remain%60,val2));
|
||||
Message(0, "You can use this discipline in %d minutes %d seconds.", ((remain)/60), (remain%60));
|
||||
return(false);
|
||||
}
|
||||
|
||||
256
zone/entity.cpp
256
zone/entity.cpp
@ -1671,9 +1671,9 @@ void EntityList::DuelMessage(Mob *winner, Mob *loser, bool flee)
|
||||
//might want some sort of distance check in here?
|
||||
if (cur != winner && cur != loser) {
|
||||
if (flee)
|
||||
cur->Message_StringID(Chat::Yellow, DUEL_FLED, winner->GetName(),loser->GetName(),loser->GetName());
|
||||
cur->MessageString(Chat::Yellow, DUEL_FLED, winner->GetName(),loser->GetName(),loser->GetName());
|
||||
else
|
||||
cur->Message_StringID(Chat::Yellow, DUEL_FINISHED, winner->GetName(),loser->GetName());
|
||||
cur->MessageString(Chat::Yellow, DUEL_FINISHED, winner->GetName(),loser->GetName());
|
||||
}
|
||||
++it;
|
||||
}
|
||||
@ -2071,7 +2071,7 @@ void EntityList::QueueClientsGuildBankItemUpdate(const GuildBankItemUpdate_Struc
|
||||
void EntityList::MessageStatus(uint32 to_guild_id, int to_minstatus, uint32 type, const char *message, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char buffer[4096];
|
||||
char buffer[4096];
|
||||
|
||||
va_start(argptr, message);
|
||||
vsnprintf(buffer, 4096, message, argptr);
|
||||
@ -2080,22 +2080,66 @@ void EntityList::MessageStatus(uint32 to_guild_id, int to_minstatus, uint32 type
|
||||
auto it = client_list.begin();
|
||||
while (it != client_list.end()) {
|
||||
Client *client = it->second;
|
||||
if ((to_guild_id == 0 || client->IsInGuild(to_guild_id)) && client->Admin() >= to_minstatus)
|
||||
if ((to_guild_id == 0 || client->IsInGuild(to_guild_id)) && client->Admin() >= to_minstatus) {
|
||||
client->Message(type, buffer);
|
||||
}
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
// works much like MessageClose, but with formatted strings
|
||||
void EntityList::MessageClose_StringID(Mob *sender, bool skipsender, float dist, uint32 type, uint32 string_id, const char* message1,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9)
|
||||
/**
|
||||
* @param sender
|
||||
* @param skipsender
|
||||
* @param dist
|
||||
* @param type
|
||||
* @param string_id
|
||||
* @param message1
|
||||
* @param message2
|
||||
* @param message3
|
||||
* @param message4
|
||||
* @param message5
|
||||
* @param message6
|
||||
* @param message7
|
||||
* @param message8
|
||||
* @param message9
|
||||
*/
|
||||
void EntityList::MessageCloseString(
|
||||
Mob *sender,
|
||||
bool skipsender,
|
||||
float dist,
|
||||
uint32 type,
|
||||
uint32 string_id,
|
||||
const char *message1,
|
||||
const char *message2,
|
||||
const char *message3,
|
||||
const char *message4,
|
||||
const char *message5,
|
||||
const char *message6,
|
||||
const char *message7,
|
||||
const char *message8,
|
||||
const char *message9
|
||||
)
|
||||
{
|
||||
Client *c;
|
||||
float dist2 = dist * dist;
|
||||
float dist2 = dist * dist;
|
||||
|
||||
for (auto it = client_list.begin(); it != client_list.end(); ++it) {
|
||||
c = it->second;
|
||||
if(c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender))
|
||||
c->Message_StringID(type, string_id, message1, message2, message3, message4, message5, message6, message7, message8, message9);
|
||||
for (auto & it : client_list) {
|
||||
c = it.second;
|
||||
if (c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender)) {
|
||||
c->MessageString(
|
||||
type,
|
||||
string_id,
|
||||
message1,
|
||||
message2,
|
||||
message3,
|
||||
message4,
|
||||
message5,
|
||||
message6,
|
||||
message7,
|
||||
message8,
|
||||
message9
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2116,56 +2160,162 @@ void EntityList::MessageClose_StringID(Mob *sender, bool skipsender, float dist,
|
||||
* @param message8
|
||||
* @param message9
|
||||
*/
|
||||
void EntityList::FilteredMessageClose_StringID(Mob *sender, bool skipsender,
|
||||
float dist, uint32 type, eqFilterType filter, uint32 string_id,
|
||||
const char *message1, const char *message2, const char *message3,
|
||||
const char *message4, const char *message5, const char *message6,
|
||||
const char *message7, const char *message8, const char *message9)
|
||||
void EntityList::FilteredMessageCloseString(
|
||||
Mob *sender, bool skipsender,
|
||||
float dist,
|
||||
uint32 type,
|
||||
eqFilterType filter,
|
||||
uint32 string_id,
|
||||
const char *message1,
|
||||
const char *message2,
|
||||
const char *message3,
|
||||
const char *message4,
|
||||
const char *message5,
|
||||
const char *message6,
|
||||
const char *message7,
|
||||
const char *message8,
|
||||
const char *message9
|
||||
)
|
||||
{
|
||||
Client *c;
|
||||
float dist2 = dist * dist;
|
||||
float dist2 = dist * dist;
|
||||
|
||||
for (auto it = client_list.begin(); it != client_list.end(); ++it) {
|
||||
c = it->second;
|
||||
if (c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender))
|
||||
c->FilteredMessage_StringID(sender, type, filter, string_id,
|
||||
message1, message2, message3, message4, message5,
|
||||
message6, message7, message8, message9);
|
||||
for (auto & it : client_list) {
|
||||
c = it.second;
|
||||
if (c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender)) {
|
||||
c->FilteredMessageString(
|
||||
sender, type, filter, string_id,
|
||||
message1, message2, message3, message4, message5,
|
||||
message6, message7, message8, message9
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EntityList::Message_StringID(Mob *sender, bool skipsender, uint32 type, uint32 string_id, const char* message1,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9)
|
||||
/**
|
||||
*
|
||||
* @param sender
|
||||
* @param skipsender
|
||||
* @param type
|
||||
* @param string_id
|
||||
* @param message1
|
||||
* @param message2
|
||||
* @param message3
|
||||
* @param message4
|
||||
* @param message5
|
||||
* @param message6
|
||||
* @param message7
|
||||
* @param message8
|
||||
* @param message9
|
||||
*/
|
||||
void EntityList::MessageString(
|
||||
Mob *sender,
|
||||
bool skipsender,
|
||||
uint32 type,
|
||||
uint32 string_id,
|
||||
const char *message1,
|
||||
const char *message2,
|
||||
const char *message3,
|
||||
const char *message4,
|
||||
const char *message5,
|
||||
const char *message6,
|
||||
const char *message7,
|
||||
const char *message8,
|
||||
const char *message9
|
||||
)
|
||||
{
|
||||
Client *c;
|
||||
|
||||
for (auto it = client_list.begin(); it != client_list.end(); ++it) {
|
||||
c = it->second;
|
||||
if(c && (!skipsender || c != sender))
|
||||
c->Message_StringID(type, string_id, message1, message2, message3, message4, message5, message6, message7, message8, message9);
|
||||
for (auto & it : client_list) {
|
||||
c = it.second;
|
||||
if (c && (!skipsender || c != sender)) {
|
||||
c->MessageString(
|
||||
type,
|
||||
string_id,
|
||||
message1,
|
||||
message2,
|
||||
message3,
|
||||
message4,
|
||||
message5,
|
||||
message6,
|
||||
message7,
|
||||
message8,
|
||||
message9
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EntityList::FilteredMessage_StringID(Mob *sender, bool skipsender,
|
||||
uint32 type, eqFilterType filter, uint32 string_id,
|
||||
const char *message1, const char *message2, const char *message3,
|
||||
const char *message4, const char *message5, const char *message6,
|
||||
const char *message7, const char *message8, const char *message9)
|
||||
/**
|
||||
*
|
||||
* @param sender
|
||||
* @param skipsender
|
||||
* @param type
|
||||
* @param filter
|
||||
* @param string_id
|
||||
* @param message1
|
||||
* @param message2
|
||||
* @param message3
|
||||
* @param message4
|
||||
* @param message5
|
||||
* @param message6
|
||||
* @param message7
|
||||
* @param message8
|
||||
* @param message9
|
||||
*/
|
||||
void EntityList::FilteredMessageString(
|
||||
Mob *sender,
|
||||
bool skipsender,
|
||||
uint32 type,
|
||||
eqFilterType filter,
|
||||
uint32 string_id,
|
||||
const char *message1,
|
||||
const char *message2,
|
||||
const char *message3,
|
||||
const char *message4,
|
||||
const char *message5,
|
||||
const char *message6,
|
||||
const char *message7,
|
||||
const char *message8,
|
||||
const char *message9
|
||||
)
|
||||
{
|
||||
Client *c;
|
||||
|
||||
for (auto it = client_list.begin(); it != client_list.end(); ++it) {
|
||||
c = it->second;
|
||||
if (c && (!skipsender || c != sender))
|
||||
c->FilteredMessage_StringID(sender, type, filter, string_id,
|
||||
message1, message2, message3, message4, message5, message6,
|
||||
message7, message8, message9);
|
||||
for (auto & it : client_list) {
|
||||
c = it.second;
|
||||
if (c && (!skipsender || c != sender)) {
|
||||
c->FilteredMessageString(
|
||||
sender,
|
||||
type,
|
||||
filter,
|
||||
string_id,
|
||||
message1,
|
||||
message2,
|
||||
message3,
|
||||
message4,
|
||||
message5,
|
||||
message6,
|
||||
message7,
|
||||
message8,
|
||||
message9
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EntityList::MessageClose(Mob* sender, bool skipsender, float dist, uint32 type, const char* message, ...)
|
||||
/**
|
||||
* @param sender
|
||||
* @param skipsender
|
||||
* @param dist
|
||||
* @param type
|
||||
* @param message
|
||||
* @param ...
|
||||
*/
|
||||
void EntityList::MessageClose(Mob *sender, bool skipsender, float dist, uint32 type, const char *message, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char buffer[4096];
|
||||
char buffer[4096];
|
||||
|
||||
va_start(argptr, message);
|
||||
vsnprintf(buffer, 4095, message, argptr);
|
||||
@ -2175,16 +2325,26 @@ void EntityList::MessageClose(Mob* sender, bool skipsender, float dist, uint32 t
|
||||
|
||||
auto it = client_list.begin();
|
||||
while (it != client_list.end()) {
|
||||
if (DistanceSquared(it->second->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || it->second != sender))
|
||||
if (DistanceSquared(it->second->GetPosition(), sender->GetPosition()) <= dist2 &&
|
||||
(!skipsender || it->second != sender)) {
|
||||
it->second->Message(type, buffer);
|
||||
}
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
void EntityList::FilteredMessageClose(Mob *sender, bool skipsender, float dist, uint32 type, eqFilterType filter, const char *message, ...)
|
||||
void EntityList::FilteredMessageClose(
|
||||
Mob *sender,
|
||||
bool skipsender,
|
||||
float dist,
|
||||
uint32 type,
|
||||
eqFilterType filter,
|
||||
const char *message,
|
||||
...
|
||||
)
|
||||
{
|
||||
va_list argptr;
|
||||
char buffer[4096];
|
||||
char buffer[4096];
|
||||
|
||||
va_start(argptr, message);
|
||||
vsnprintf(buffer, 4095, message, argptr);
|
||||
@ -2194,8 +2354,10 @@ void EntityList::FilteredMessageClose(Mob *sender, bool skipsender, float dist,
|
||||
|
||||
auto it = client_list.begin();
|
||||
while (it != client_list.end()) {
|
||||
if (DistanceSquared(it->second->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || it->second != sender))
|
||||
it->second->FilteredMessage(sender, type, filter, buffer);
|
||||
if (DistanceSquared(it->second->GetPosition(), sender->GetPosition()) <= dist2 &&
|
||||
(!skipsender || it->second != sender)) {
|
||||
it->second->FilteredMessage(sender, type, filter, buffer);
|
||||
}
|
||||
++it;
|
||||
}
|
||||
}
|
||||
@ -4649,7 +4811,7 @@ void EntityList::ExpeditionWarning(uint32 minutes_left)
|
||||
|
||||
auto it = client_list.begin();
|
||||
while (it != client_list.end()) {
|
||||
it->second->Message_StringID(Chat::Yellow, EXPEDITION_MIN_REMAIN, itoa((int)minutes_left));
|
||||
it->second->MessageString(Chat::Yellow, EXPEDITION_MIN_REMAIN, itoa((int)minutes_left));
|
||||
it->second->QueuePacket(outapp);
|
||||
++it;
|
||||
}
|
||||
|
||||
@ -321,10 +321,39 @@ public:
|
||||
void MessageStatus(uint32 to_guilddbid, int to_minstatus, uint32 type, const char* message, ...);
|
||||
void MessageClose(Mob* sender, bool skipsender, float dist, uint32 type, const char* message, ...);
|
||||
void FilteredMessageClose(Mob* sender, bool skipsender, float dist, uint32 type, eqFilterType filter, const char* message, ...);
|
||||
void Message_StringID(Mob *sender, bool skipsender, uint32 type, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
|
||||
void FilteredMessage_StringID(Mob *sender, bool skipsender, uint32 type, eqFilterType filter, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
|
||||
void MessageClose_StringID(Mob *sender, bool skipsender, float dist, uint32 type, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
|
||||
void FilteredMessageClose_StringID(Mob *sender, bool skipsender, float dist, uint32 type, eqFilterType filter, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
|
||||
void MessageString(Mob *sender, bool skipsender, uint32 type, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
|
||||
void FilteredMessageString(Mob *sender, bool skipsender, uint32 type, eqFilterType filter, uint32 string_id, const char* message1=0,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0);
|
||||
void MessageCloseString(
|
||||
Mob *sender,
|
||||
bool skipsender,
|
||||
float dist,
|
||||
uint32 type,
|
||||
uint32 string_id,
|
||||
const char *message1 = 0,
|
||||
const char *message2 = 0,
|
||||
const char *message3 = 0,
|
||||
const char *message4 = 0,
|
||||
const char *message5 = 0,
|
||||
const char *message6 = 0,
|
||||
const char *message7 = 0,
|
||||
const char *message8 = 0,
|
||||
const char *message9 = 0);
|
||||
void FilteredMessageCloseString(
|
||||
Mob *sender,
|
||||
bool skipsender,
|
||||
float dist,
|
||||
uint32 type,
|
||||
eqFilterType filter,
|
||||
uint32 string_id,
|
||||
const char *message1 = 0,
|
||||
const char *message2 = 0,
|
||||
const char *message3 = 0,
|
||||
const char *message4 = 0,
|
||||
const char *message5 = 0,
|
||||
const char *message6 = 0,
|
||||
const char *message7 = 0,
|
||||
const char *message8 = 0,
|
||||
const char *message9 = 0);
|
||||
void ChannelMessageFromWorld(const char* from, const char* to, uint8 chan_num, uint32 guilddbid, uint8 language, uint8 lang_skill, const char* message);
|
||||
void ChannelMessage(Mob* from, uint8 chan_num, uint8 language, const char* message, ...);
|
||||
void ChannelMessage(Mob* from, uint8 chan_num, uint8 language, uint8 lang_skill, const char* message, ...);
|
||||
|
||||
40
zone/exp.cpp
40
zone/exp.cpp
@ -333,18 +333,18 @@ void Client::CalculateLeadershipExp(uint32 &add_exp, uint8 conlevel)
|
||||
uint32 mentor_exp = exp * (GetGroup()->GetMentorPercent() / 100.0f);
|
||||
exp -= mentor_exp;
|
||||
mentoree->AddLeadershipEXP(mentor_exp, 0); // ends up rounded down
|
||||
mentoree->Message_StringID(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
||||
mentoree->MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
||||
}
|
||||
if (exp > 0)
|
||||
{
|
||||
// possible if you mentor 100% to the other client
|
||||
AddLeadershipEXP(exp, 0); // ends up rounded up if mentored, no idea how live actually does it
|
||||
Message_StringID(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
||||
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
|
||||
MessageString(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -357,11 +357,11 @@ void Client::CalculateLeadershipExp(uint32 &add_exp, uint8 conlevel)
|
||||
&& RuleI(Character, KillsPerRaidLeadershipAA) > 0)
|
||||
{
|
||||
AddLeadershipEXP(0, RAID_EXP_PER_POINT / RuleI(Character, KillsPerRaidLeadershipAA));
|
||||
Message_StringID(Chat::LeaderShip, GAIN_RAID_LEADERSHIP_EXP);
|
||||
MessageString(Chat::LeaderShip, GAIN_RAID_LEADERSHIP_EXP);
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::LeaderShip, MAX_RAID_LEADERSHIP_POINTS);
|
||||
MessageString(Chat::LeaderShip, MAX_RAID_LEADERSHIP_POINTS);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -378,17 +378,17 @@ void Client::CalculateLeadershipExp(uint32 &add_exp, uint8 conlevel)
|
||||
uint32 mentor_exp = exp * (raid->GetMentorPercent(group_id) / 100.0f);
|
||||
exp -= mentor_exp;
|
||||
mentoree->AddLeadershipEXP(mentor_exp, 0);
|
||||
mentoree->Message_StringID(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
||||
mentoree->MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
||||
}
|
||||
if (exp > 0)
|
||||
{
|
||||
AddLeadershipEXP(exp, 0);
|
||||
Message_StringID(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
||||
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_EXP);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
|
||||
MessageString(Chat::LeaderShip, MAX_GROUP_LEADERSHIP_POINTS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -565,22 +565,22 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
||||
if (isrezzexp) {
|
||||
if (RuleI(Character, ShowExpValues) > 0)
|
||||
Message(Chat::Experience, "You regain %s experience from resurrection. %s", exp_amount_message.c_str(), exp_percent_message.c_str());
|
||||
else Message_StringID(Chat::Experience, REZ_REGAIN);
|
||||
else MessageString(Chat::Experience, REZ_REGAIN);
|
||||
} else {
|
||||
if (membercount > 1) {
|
||||
if (RuleI(Character, ShowExpValues) > 0)
|
||||
Message(Chat::Experience, "You have gained %s party experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
|
||||
else Message_StringID(Chat::Experience, GAIN_GROUPXP);
|
||||
else MessageString(Chat::Experience, GAIN_GROUPXP);
|
||||
}
|
||||
else if (IsRaidGrouped()) {
|
||||
if (RuleI(Character, ShowExpValues) > 0)
|
||||
Message(Chat::Experience, "You have gained %s raid experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
|
||||
else Message_StringID(Chat::Experience, GAIN_RAIDEXP);
|
||||
else MessageString(Chat::Experience, GAIN_RAIDEXP);
|
||||
}
|
||||
else {
|
||||
if (RuleI(Character, ShowExpValues) > 0)
|
||||
Message(Chat::Experience, "You have gained %s experience! %s", exp_amount_message.c_str(), exp_percent_message.c_str());
|
||||
else Message_StringID(Chat::Experience, GAIN_XP);
|
||||
else MessageString(Chat::Experience, GAIN_XP);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -656,7 +656,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
||||
|
||||
//Message(Chat::Yellow, "You have gained %d skill points!!", m_pp.aapoints - last_unspentAA);
|
||||
char val1[20]={0};
|
||||
Message_StringID(Chat::Experience, GAIN_ABILITY_POINT, ConvertArray(m_pp.aapoints, val1),m_pp.aapoints == 1 ? "" : "(s)"); //You have gained an ability point! You now have %1 ability point%2.
|
||||
MessageString(Chat::Experience, GAIN_ABILITY_POINT, ConvertArray(m_pp.aapoints, val1),m_pp.aapoints == 1 ? "" : "(s)"); //You have gained an ability point! You now have %1 ability point%2.
|
||||
|
||||
/* QS: PlayerLogAARate */
|
||||
if (RuleB(QueryServ, PlayerLogAARate)){
|
||||
@ -699,18 +699,18 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
||||
if (level_increase)
|
||||
{
|
||||
if (level_count == 1)
|
||||
Message_StringID(Chat::Experience, GAIN_LEVEL, ConvertArray(check_level, val1));
|
||||
MessageString(Chat::Experience, GAIN_LEVEL, ConvertArray(check_level, val1));
|
||||
else
|
||||
Message(Chat::Yellow, "Welcome to level %i!", check_level);
|
||||
|
||||
if (check_level == RuleI(Character, DeathItemLossLevel))
|
||||
Message_StringID(Chat::Yellow, CORPSE_ITEM_LOST);
|
||||
MessageString(Chat::Yellow, CORPSE_ITEM_LOST);
|
||||
|
||||
if (check_level == RuleI(Character, DeathExpLossLevel))
|
||||
Message_StringID(Chat::Yellow, CORPSE_EXP_LOST);
|
||||
MessageString(Chat::Yellow, CORPSE_EXP_LOST);
|
||||
}
|
||||
else
|
||||
Message_StringID(Chat::Experience, LOSE_LEVEL, ConvertArray(check_level, val1));
|
||||
MessageString(Chat::Experience, LOSE_LEVEL, ConvertArray(check_level, val1));
|
||||
|
||||
#ifdef BOTS
|
||||
uint8 myoldlevel = GetLevel();
|
||||
@ -758,7 +758,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
|
||||
char val1[20]={0};
|
||||
char val2[20]={0};
|
||||
char val3[20]={0};
|
||||
Message_StringID(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, 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).
|
||||
}
|
||||
}
|
||||
|
||||
@ -1077,12 +1077,12 @@ void Client::SetLeadershipEXP(uint32 group_exp, uint32 raid_exp) {
|
||||
while(group_exp >= GROUP_EXP_PER_POINT) {
|
||||
group_exp -= GROUP_EXP_PER_POINT;
|
||||
m_pp.group_leadership_points++;
|
||||
Message_StringID(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_POINT);
|
||||
MessageString(Chat::LeaderShip, GAIN_GROUP_LEADERSHIP_POINT);
|
||||
}
|
||||
while(raid_exp >= RAID_EXP_PER_POINT) {
|
||||
raid_exp -= RAID_EXP_PER_POINT;
|
||||
m_pp.raid_leadership_points++;
|
||||
Message_StringID(Chat::LeaderShip, GAIN_RAID_LEADERSHIP_POINT);
|
||||
MessageString(Chat::LeaderShip, GAIN_RAID_LEADERSHIP_POINT);
|
||||
}
|
||||
|
||||
m_pp.group_leadership_exp = group_exp;
|
||||
|
||||
@ -161,14 +161,14 @@ bool Client::CanFish() {
|
||||
|
||||
if (!Pole || !Pole->IsClassCommon() || Pole->GetItem()->ItemType != EQEmu::item::ItemTypeFishingPole) {
|
||||
if (m_inv.HasItemByUse(EQEmu::item::ItemTypeFishingPole, 1, invWhereWorn | invWherePersonal | invWhereBank | invWhereSharedBank | invWhereTrading | invWhereCursor)) //We have a fishing pole somewhere, just not equipped
|
||||
Message_StringID(Chat::Skills, FISHING_EQUIP_POLE); //You need to put your fishing pole in your primary hand.
|
||||
MessageString(Chat::Skills, FISHING_EQUIP_POLE); //You need to put your fishing pole in your primary hand.
|
||||
else //We don't have a fishing pole anywhere
|
||||
Message_StringID(Chat::Skills, FISHING_NO_POLE); //You can't fish without a fishing pole, go buy one.
|
||||
MessageString(Chat::Skills, FISHING_NO_POLE); //You can't fish without a fishing pole, go buy one.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Bait || !Bait->IsClassCommon() || Bait->GetItem()->ItemType != EQEmu::item::ItemTypeFishingBait) {
|
||||
Message_StringID(Chat::Skills, FISHING_NO_BAIT); //You can't fish without fishing bait, go buy some.
|
||||
MessageString(Chat::Skills, FISHING_NO_BAIT); //You can't fish without fishing bait, go buy some.
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -190,7 +190,7 @@ bool Client::CanFish() {
|
||||
float bestz = zone->zonemap->FindBestZ(rodPosition, nullptr);
|
||||
float len = m_Position.z - bestz;
|
||||
if(len > LineLength || len < 0.0f) {
|
||||
Message_StringID(Chat::Skills, FISHING_LAND);
|
||||
MessageString(Chat::Skills, FISHING_LAND);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -203,7 +203,7 @@ bool Client::CanFish() {
|
||||
bool in_water = zone->watermap->InWater(dest) || zone->watermap->InVWater(dest);
|
||||
|
||||
if (in_lava) {
|
||||
Message_StringID(Chat::Skills, FISHING_LAVA); //Trying to catch a fire elemental or something?
|
||||
MessageString(Chat::Skills, FISHING_LAVA); //Trying to catch a fire elemental or something?
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ bool Client::CanFish() {
|
||||
}
|
||||
}
|
||||
|
||||
Message_StringID(Chat::Skills, FISHING_LAND);
|
||||
MessageString(Chat::Skills, FISHING_LAND);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -223,7 +223,7 @@ void Client::GoFish()
|
||||
|
||||
//TODO: generate a message if we're already fishing
|
||||
/*if (!fishing_timer.Check()) { //this isn't the right check, may need to add something to the Client class like 'bool is_fishing'
|
||||
Message_StringID(Chat::WhiteSmoke, ALREADY_FISHING); //You are already fishing!
|
||||
MessageString(Chat::WhiteSmoke, ALREADY_FISHING); //You are already fishing!
|
||||
return;
|
||||
}*/
|
||||
|
||||
@ -315,17 +315,17 @@ void Client::GoFish()
|
||||
const EQEmu::ItemData* food_item = database.GetItem(food_id);
|
||||
|
||||
if (food_item->ItemType != EQEmu::item::ItemTypeFood) {
|
||||
Message_StringID(Chat::Skills, FISHING_SUCCESS);
|
||||
MessageString(Chat::Skills, FISHING_SUCCESS);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::Skills, FISHING_SUCCESS_FISH_NAME, food_item->Name);
|
||||
MessageString(Chat::Skills, FISHING_SUCCESS_FISH_NAME, food_item->Name);
|
||||
}
|
||||
|
||||
EQEmu::ItemInstance* inst = database.CreateItem(food_item, 1);
|
||||
if(inst != nullptr) {
|
||||
if(CheckLoreConflict(inst->GetItem()))
|
||||
{
|
||||
Message_StringID(Chat::White, DUP_LORE);
|
||||
MessageString(Chat::White, DUP_LORE);
|
||||
safe_delete(inst);
|
||||
}
|
||||
else
|
||||
@ -351,13 +351,13 @@ void Client::GoFish()
|
||||
//chance to use bait when you dont catch anything...
|
||||
if (zone->random.Int(0, 4) == 1) {
|
||||
DeleteItemInInventory(bslot, 1, true); //do we need client update?
|
||||
Message_StringID(Chat::Skills, FISHING_LOST_BAIT); //You lost your bait!
|
||||
MessageString(Chat::Skills, FISHING_LOST_BAIT); //You lost your bait!
|
||||
} else {
|
||||
if (zone->random.Int(0, 15) == 1) //give about a 1 in 15 chance to spill your beer. we could make this a rule, but it doesn't really seem worth it
|
||||
//TODO: check for & consume an alcoholic beverage from inventory when this triggers, and set it as a rule that's disabled by default
|
||||
Message_StringID(Chat::Skills, FISHING_SPILL_BEER); //You spill your beer while bringing in your line.
|
||||
MessageString(Chat::Skills, FISHING_SPILL_BEER); //You spill your beer while bringing in your line.
|
||||
else
|
||||
Message_StringID(Chat::Skills, FISHING_FAILED); //You didn't catch anything.
|
||||
MessageString(Chat::Skills, FISHING_FAILED); //You didn't catch anything.
|
||||
}
|
||||
|
||||
parse->EventPlayer(EVENT_FISH_FAILURE, this, "", 0);
|
||||
@ -367,7 +367,7 @@ void Client::GoFish()
|
||||
//this is potentially exploitable in that they can fish
|
||||
//and then swap out items in primary slot... too lazy to fix right now
|
||||
if (zone->random.Int(0, 49) == 1) {
|
||||
Message_StringID(Chat::Skills, FISHING_POLE_BROKE); //Your fishing pole broke!
|
||||
MessageString(Chat::Skills, FISHING_POLE_BROKE); //Your fishing pole broke!
|
||||
DeleteItemInInventory(EQEmu::invslot::slotPrimary, 0, true);
|
||||
}
|
||||
|
||||
@ -434,13 +434,13 @@ void Client::ForageItem(bool guarantee) {
|
||||
break;
|
||||
}
|
||||
|
||||
Message_StringID(Chat::Skills, stringid);
|
||||
MessageString(Chat::Skills, stringid);
|
||||
EQEmu::ItemInstance* inst = database.CreateItem(food_item, 1);
|
||||
if(inst != nullptr) {
|
||||
// check to make sure it isn't a foraged lore item
|
||||
if(CheckLoreConflict(inst->GetItem()))
|
||||
{
|
||||
Message_StringID(Chat::White, DUP_LORE);
|
||||
MessageString(Chat::White, DUP_LORE);
|
||||
safe_delete(inst);
|
||||
}
|
||||
else {
|
||||
@ -462,12 +462,12 @@ void Client::ForageItem(bool guarantee) {
|
||||
|
||||
int ChanceSecondForage = aabonuses.ForageAdditionalItems + itembonuses.ForageAdditionalItems + spellbonuses.ForageAdditionalItems;
|
||||
if(!guarantee && zone->random.Roll(ChanceSecondForage)) {
|
||||
Message_StringID(Chat::Skills, FORAGE_MASTERY);
|
||||
MessageString(Chat::Skills, FORAGE_MASTERY);
|
||||
ForageItem(true);
|
||||
}
|
||||
|
||||
} else {
|
||||
Message_StringID(Chat::Skills, FORAGE_FAILED);
|
||||
MessageString(Chat::Skills, FORAGE_FAILED);
|
||||
parse->EventPlayer(EVENT_FORAGE_FAILURE, this, "", 0);
|
||||
}
|
||||
|
||||
|
||||
@ -1236,7 +1236,7 @@ void Group::VerifyGroup() {
|
||||
}
|
||||
}
|
||||
|
||||
void Group::GroupMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
|
||||
void Group::GroupMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
|
||||
uint32 i;
|
||||
for (i = 0; i < MAX_GROUP_MEMBERS; i++) {
|
||||
if(members[i] == nullptr)
|
||||
@ -1248,7 +1248,7 @@ void Group::GroupMessage_StringID(Mob* sender, uint32 type, uint32 string_id, co
|
||||
if(!members[i]->IsClient())
|
||||
continue;
|
||||
|
||||
members[i]->Message_StringID(type, string_id, message, message2, message3, message4, message5, message6, message7, message8, message9, 0);
|
||||
members[i]->MessageString(type, string_id, message, message2, message3, message4, message5, message6, message7, message8, message9, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ public:
|
||||
void GroupBardPulse(Mob* caster,uint16 spellid);
|
||||
void SplitExp(uint32 exp, Mob* other);
|
||||
void GroupMessage(Mob* sender,uint8 language,uint8 lang_skill,const char* message);
|
||||
void GroupMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
|
||||
void GroupMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
|
||||
uint32 GetTotalGroupDamage(Mob* other);
|
||||
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, Client *splitter = nullptr);
|
||||
inline void SetLeader(Mob* newleader){ leader=newleader; };
|
||||
|
||||
@ -853,7 +853,7 @@ void Client::SendCursorBuffer()
|
||||
if (!lore_pass) {
|
||||
Log(Logs::General, Logs::Inventory, "(%s) Duplicate lore items are not allowed - destroying item %s(id:%u) on cursor",
|
||||
GetName(), test_item->Name, test_item->ID);
|
||||
Message_StringID(Chat::Loot, 290);
|
||||
MessageString(Chat::Loot, 290);
|
||||
parse->EventItem(EVENT_DESTROY_ITEM, this, test_inst, nullptr, "", 0);
|
||||
DeleteItemInInventory(EQEmu::invslot::slotCursor);
|
||||
SendCursorBuffer();
|
||||
@ -1555,7 +1555,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
if (!lore_pass) {
|
||||
Log(Logs::General, Logs::Inventory, "(%s) Duplicate lore items are not allowed - destroying item %s(id:%u) on cursor",
|
||||
GetName(), test_item->Name, test_item->ID);
|
||||
Message_StringID(Chat::Loot, 290);
|
||||
MessageString(Chat::Loot, 290);
|
||||
parse->EventItem(EVENT_DESTROY_ITEM, this, test_inst, nullptr, "", 0);
|
||||
DeleteItemInInventory(EQEmu::invslot::slotCursor, 0, true);
|
||||
}
|
||||
|
||||
@ -743,9 +743,9 @@ void Lua_Mob::Message(int type, const char *message) {
|
||||
self->Message(type, message);
|
||||
}
|
||||
|
||||
void Lua_Mob::Message_StringID(int type, int string_id, uint32 distance) {
|
||||
void Lua_Mob::MessageString(int type, int string_id, uint32 distance) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->Message_StringID(type, string_id, distance);
|
||||
self->MessageString(type, string_id, distance);
|
||||
}
|
||||
|
||||
void Lua_Mob::Say(const char *message) {
|
||||
@ -2386,7 +2386,8 @@ luabind::scope lua_register_mob() {
|
||||
.def("SetCurrentWP", &Lua_Mob::SetCurrentWP)
|
||||
.def("GetSize", &Lua_Mob::GetSize)
|
||||
.def("Message", &Lua_Mob::Message)
|
||||
.def("Message_StringID", &Lua_Mob::Message_StringID)
|
||||
.def("MessageString", &Lua_Mob::MessageString)
|
||||
.def("Message_StringID", &Lua_Mob::MessageString)
|
||||
.def("Say", (void(Lua_Mob::*)(const char*))& Lua_Mob::Say)
|
||||
.def("Say", (void(Lua_Mob::*)(const char*, int))& Lua_Mob::Say)
|
||||
.def("QuestSay", (void(Lua_Mob::*)(Lua_Client,const char *))&Lua_Mob::QuestSay)
|
||||
|
||||
@ -166,7 +166,7 @@ public:
|
||||
void SetCurrentWP(int wp);
|
||||
double GetSize();
|
||||
void Message(int type, const char *message);
|
||||
void Message_StringID(int type, int string_id, uint32 distance);
|
||||
void MessageString(int type, int string_id, uint32 distance);
|
||||
void Say(const char *message);
|
||||
void Say(const char* message, int language);
|
||||
void QuestSay(Lua_Client client, const char *message);
|
||||
|
||||
@ -1618,7 +1618,7 @@ void Merc::AI_Process() {
|
||||
{
|
||||
if(zone->random.Roll(flurrychance))
|
||||
{
|
||||
Message_StringID(Chat::NPCFlurry, YOU_FLURRY);
|
||||
MessageString(Chat::NPCFlurry, YOU_FLURRY);
|
||||
Attack(GetTarget(), EQEmu::invslot::slotPrimary, false);
|
||||
Attack(GetTarget(), EQEmu::invslot::slotPrimary, false);
|
||||
}
|
||||
@ -2623,7 +2623,7 @@ int16 Merc::GetFocusEffect(focusType type, uint16 spell_id) {
|
||||
realTotal = CalcFocusEffect(type, UsedFocusID, spell_id);
|
||||
|
||||
if (realTotal != 0 && UsedItem)
|
||||
Message_StringID(Chat::Spells, BEGINS_TO_GLOW, UsedItem->Name);
|
||||
MessageString(Chat::Spells, BEGINS_TO_GLOW, UsedItem->Name);
|
||||
}
|
||||
|
||||
//Check if spell focus effect exists for the client.
|
||||
|
||||
28
zone/mob.cpp
28
zone/mob.cpp
@ -2835,7 +2835,7 @@ void Mob::Say(const char *format, ...)
|
||||
talker = this;
|
||||
}
|
||||
|
||||
entity_list.MessageClose_StringID(
|
||||
entity_list.MessageCloseString(
|
||||
talker, false, 200, 10,
|
||||
GENERIC_SAY, GetCleanName(), buf
|
||||
);
|
||||
@ -2850,7 +2850,8 @@ void Mob::Say_StringID(uint32 string_id, const char *message3, const char *messa
|
||||
|
||||
snprintf(string_id_str, 10, "%d", string_id);
|
||||
|
||||
entity_list.MessageClose_StringID(this, false, 200, 10,
|
||||
entity_list.MessageCloseString(
|
||||
this, false, 200, 10,
|
||||
GENERIC_STRINGID_SAY, GetCleanName(), string_id_str, message3, message4, message5,
|
||||
message6, message7, message8, message9
|
||||
);
|
||||
@ -2862,7 +2863,8 @@ void Mob::Say_StringID(uint32 type, uint32 string_id, const char *message3, cons
|
||||
|
||||
snprintf(string_id_str, 10, "%d", string_id);
|
||||
|
||||
entity_list.MessageClose_StringID(this, false, 200, type,
|
||||
entity_list.MessageCloseString(
|
||||
this, false, 200, type,
|
||||
GENERIC_STRINGID_SAY, GetCleanName(), string_id_str, message3, message4, message5,
|
||||
message6, message7, message8, message9
|
||||
);
|
||||
@ -2875,7 +2877,7 @@ void Mob::SayTo_StringID(Client *to, uint32 string_id, const char *message3, con
|
||||
|
||||
auto string_id_str = std::to_string(string_id);
|
||||
|
||||
to->Message_StringID(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
|
||||
to->MessageString(Chat::NPCQuestSay, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
|
||||
}
|
||||
|
||||
void Mob::SayTo_StringID(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)
|
||||
@ -2885,7 +2887,7 @@ void Mob::SayTo_StringID(Client *to, uint32 type, uint32 string_id, const char *
|
||||
|
||||
auto string_id_str = std::to_string(string_id);
|
||||
|
||||
to->Message_StringID(type, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
|
||||
to->MessageString(type, GENERIC_STRINGID_SAY, GetCleanName(), string_id_str.c_str(), message3, message4, message5, message6, message7, message8, message9);
|
||||
}
|
||||
|
||||
void Mob::Shout(const char *format, ...)
|
||||
@ -2897,7 +2899,7 @@ void Mob::Shout(const char *format, ...)
|
||||
vsnprintf(buf, 1000, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
entity_list.Message_StringID(this, false, Chat::Shout,
|
||||
entity_list.MessageString(this, false, Chat::Shout,
|
||||
GENERIC_SHOUT, GetCleanName(), buf);
|
||||
}
|
||||
|
||||
@ -2910,8 +2912,10 @@ void Mob::Emote(const char *format, ...)
|
||||
vsnprintf(buf, 1000, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
entity_list.MessageClose_StringID(this, false, 200, 10,
|
||||
GENERIC_EMOTE, GetCleanName(), buf);
|
||||
entity_list.MessageCloseString(
|
||||
this, false, 200, 10,
|
||||
GENERIC_EMOTE, GetCleanName(), buf
|
||||
);
|
||||
}
|
||||
|
||||
void Mob::QuestJournalledSay(Client *QuestInitiator, const char *str, Journal::Options &opts)
|
||||
@ -4887,16 +4891,16 @@ void Mob::SlowMitigation(Mob* caster)
|
||||
if (GetSlowMitigation() && caster && caster->IsClient())
|
||||
{
|
||||
if ((GetSlowMitigation() > 0) && (GetSlowMitigation() < 26))
|
||||
caster->Message_StringID(Chat::SpellFailure, SLOW_MOSTLY_SUCCESSFUL);
|
||||
caster->MessageString(Chat::SpellFailure, SLOW_MOSTLY_SUCCESSFUL);
|
||||
|
||||
else if ((GetSlowMitigation() >= 26) && (GetSlowMitigation() < 74))
|
||||
caster->Message_StringID(Chat::SpellFailure, SLOW_PARTIALLY_SUCCESSFUL);
|
||||
caster->MessageString(Chat::SpellFailure, SLOW_PARTIALLY_SUCCESSFUL);
|
||||
|
||||
else if ((GetSlowMitigation() >= 74) && (GetSlowMitigation() < 101))
|
||||
caster->Message_StringID(Chat::SpellFailure, SLOW_SLIGHTLY_SUCCESSFUL);
|
||||
caster->MessageString(Chat::SpellFailure, SLOW_SLIGHTLY_SUCCESSFUL);
|
||||
|
||||
else if (GetSlowMitigation() > 100)
|
||||
caster->Message_StringID(Chat::SpellFailure, SPELL_OPPOSITE_EFFECT);
|
||||
caster->MessageString(Chat::SpellFailure, SPELL_OPPOSITE_EFFECT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -722,12 +722,12 @@ public:
|
||||
inline void SetRareSpawn(bool in) { rare_spawn = in; }
|
||||
|
||||
virtual void Message(uint32 type, const char* message, ...) { }
|
||||
virtual void Message_StringID(uint32 type, uint32 string_id, uint32 distance = 0) { }
|
||||
virtual void Message_StringID(uint32 type, uint32 string_id, const char* message, const char* message2 = 0,
|
||||
virtual void MessageString(uint32 type, uint32 string_id, uint32 distance = 0) { }
|
||||
virtual void MessageString(uint32 type, uint32 string_id, const char* message, const char* message2 = 0,
|
||||
const char* message3 = 0, const char* message4 = 0, const char* message5 = 0, const char* message6 = 0,
|
||||
const char* message7 = 0, const char* message8 = 0, const char* message9 = 0, uint32 distance = 0) { }
|
||||
virtual void FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id) { }
|
||||
virtual void FilteredMessage_StringID(Mob *sender, uint32 type, eqFilterType filter,
|
||||
virtual void FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter, uint32 string_id) { }
|
||||
virtual void FilteredMessageString(Mob *sender, uint32 type, eqFilterType filter,
|
||||
uint32 string_id, const char *message1, const char *message2 = nullptr,
|
||||
const char *message3 = nullptr, const char *message4 = nullptr,
|
||||
const char *message5 = nullptr, const char *message6 = nullptr,
|
||||
|
||||
@ -578,7 +578,7 @@ void NPC::AI_Stop() {
|
||||
|
||||
void Client::AI_Stop() {
|
||||
Mob::AI_Stop();
|
||||
this->Message_StringID(Chat::Red,PLAYER_REGAIN);
|
||||
this->MessageString(Chat::Red,PLAYER_REGAIN);
|
||||
|
||||
auto app = new EQApplicationPacket(OP_Charm, sizeof(Charm_Struct));
|
||||
Charm_Struct *ps = (Charm_Struct*)app->pBuffer;
|
||||
@ -2029,14 +2029,14 @@ void Mob::StartEnrage()
|
||||
|
||||
// start the timer. need to call IsEnraged frequently since we dont have callback timers :-/
|
||||
bEnraged = true;
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_START, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_START, GetCleanName());
|
||||
}
|
||||
|
||||
void Mob::ProcessEnrage(){
|
||||
if(IsEnraged()){
|
||||
Timer *timer = GetSpecialAbilityTimer(SPECATK_ENRAGE);
|
||||
if(timer && timer->Check()){
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_END, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::NPCEnrage, NPC_ENRAGE_END, GetCleanName());
|
||||
|
||||
int enraged_cooldown = GetSpecialAbilityParam(SPECATK_ENRAGE, 2);
|
||||
enraged_cooldown = enraged_cooldown > 0 ? enraged_cooldown : EnragedTimer;
|
||||
@ -2057,9 +2057,23 @@ bool Mob::Flurry(ExtraAttackOptions *opts)
|
||||
Mob *target = GetTarget();
|
||||
if (target) {
|
||||
if (!IsPet()) {
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCFlurry, NPC_FLURRY, GetCleanName(), target->GetCleanName());
|
||||
entity_list.MessageCloseString(
|
||||
this,
|
||||
true,
|
||||
200,
|
||||
Chat::NPCFlurry,
|
||||
NPC_FLURRY,
|
||||
GetCleanName(),
|
||||
target->GetCleanName());
|
||||
} else {
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::PetFlurry, NPC_FLURRY, GetCleanName(), target->GetCleanName());
|
||||
entity_list.MessageCloseString(
|
||||
this,
|
||||
true,
|
||||
200,
|
||||
Chat::PetFlurry,
|
||||
NPC_FLURRY,
|
||||
GetCleanName(),
|
||||
target->GetCleanName());
|
||||
}
|
||||
|
||||
int num_attacks = GetSpecialAbilityParam(SPECATK_FLURRY, 1);
|
||||
@ -2096,9 +2110,9 @@ bool Mob::Rampage(ExtraAttackOptions *opts)
|
||||
{
|
||||
int index_hit = 0;
|
||||
if (!IsPet())
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCRampage, NPC_RAMPAGE, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, NPC_RAMPAGE, GetCleanName());
|
||||
else
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::PetFlurry, NPC_RAMPAGE, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, NPC_RAMPAGE, GetCleanName());
|
||||
|
||||
int rampage_targets = GetSpecialAbilityParam(SPECATK_RAMPAGE, 1);
|
||||
if (rampage_targets == 0) // if set to 0 or not set in the DB
|
||||
@ -2153,9 +2167,9 @@ void Mob::AreaRampage(ExtraAttackOptions *opts)
|
||||
{
|
||||
int index_hit = 0;
|
||||
if (!IsPet()) { // do not know every pet AA so thought it safer to add this
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::NPCRampage, AE_RAMPAGE, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::NPCRampage, AE_RAMPAGE, GetCleanName());
|
||||
} else {
|
||||
entity_list.MessageClose_StringID(this, true, 200, Chat::PetFlurry, AE_RAMPAGE, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, 200, Chat::PetFlurry, AE_RAMPAGE, GetCleanName());
|
||||
}
|
||||
|
||||
int rampage_targets = GetSpecialAbilityParam(SPECATK_AREA_RAMPAGE, 1);
|
||||
|
||||
@ -1744,17 +1744,17 @@ void NPC::Disarm(Client* client, int chance) {
|
||||
SendWearChange(matslot);
|
||||
if ((CastToMob()->GetBodyType() == BT_Humanoid || CastToMob()->GetBodyType() == BT_Summoned) && eslot == EQEmu::invslot::slotPrimary)
|
||||
Say("Ahh! My weapon!");
|
||||
client->Message_StringID(Chat::Skills, DISARM_SUCCESS, this->GetCleanName());
|
||||
client->MessageString(Chat::Skills, DISARM_SUCCESS, this->GetCleanName());
|
||||
if (chance != 1000)
|
||||
client->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 4);
|
||||
return;
|
||||
}
|
||||
client->Message_StringID(Chat::Skills, DISARM_FAILED);
|
||||
client->MessageString(Chat::Skills, DISARM_FAILED);
|
||||
if (chance != 1000)
|
||||
client->CheckIncreaseSkill(EQEmu::skills::SkillDisarm, nullptr, 2);
|
||||
return;
|
||||
}
|
||||
client->Message_StringID(Chat::Skills, DISARM_FAILED);
|
||||
client->MessageString(Chat::Skills, DISARM_FAILED);
|
||||
}
|
||||
|
||||
void Mob::NPCSpecialAttacks(const char* parse, int permtag, bool reset, bool remove) {
|
||||
@ -2592,7 +2592,7 @@ void NPC::DoNPCEmote(uint8 event_, uint16 emoteid)
|
||||
else if(nes->type == 2)
|
||||
this->Shout("%s",nes->text);
|
||||
else if(nes->type == 3)
|
||||
entity_list.MessageClose_StringID(this, true, 200, 10, GENERIC_STRING, nes->text);
|
||||
entity_list.MessageCloseString(this, true, 200, 10, GENERIC_STRING, nes->text);
|
||||
else
|
||||
this->Say("%s",nes->text);
|
||||
}
|
||||
|
||||
@ -1198,7 +1198,7 @@ Message(0, "Disc packet id=%d, %x,%x,%x", disc_in->disc_id, disc_in->unknown3[0]
|
||||
char val1[20]={0};
|
||||
char val2[20]={0};
|
||||
uint32 remain = p_timers.GetRemainingTime(pTimerDisciplineReuse);
|
||||
Message_StringID(Chat::WhiteSmoke,DISCIPLINE_CANUSEIN,ConvertArray((remain)/60,val1),ConvertArray(remain%60,val2));
|
||||
MessageString(Chat::WhiteSmoke,DISCIPLINE_CANUSEIN,ConvertArray((remain)/60,val1),ConvertArray(remain%60,val2));
|
||||
//Message(0,"You can use a new discipline in %i minutes %i seconds.", (disc_timer.GetRemainingTime()/1000)/60, disc_timer.GetRemainingTime()/1000%60);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3702,7 +3702,7 @@ XS(XS_Mob_Message_StringID) {
|
||||
distance = (uint32) SvUV(ST(3));
|
||||
}
|
||||
|
||||
THIS->Message_StringID(type, string_id, distance);
|
||||
THIS->MessageString(type, string_id, distance);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
@ -1712,12 +1712,12 @@ const char *Raid::GetClientNameByIndex(uint8 index)
|
||||
return members[index].membername;
|
||||
}
|
||||
|
||||
void Raid::RaidMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
|
||||
void Raid::RaidMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2,const char* message3,const char* message4,const char* message5,const char* message6,const char* message7,const char* message8,const char* message9, uint32 distance) {
|
||||
uint32 i;
|
||||
for (i = 0; i < MAX_RAID_MEMBERS; i++) {
|
||||
if(members[i].member) {
|
||||
if(members[i].member != sender)
|
||||
members[i].member->Message_StringID(type, string_id, message, message2, message3, message4, message5, message6, message7, message8, message9, distance);
|
||||
members[i].member->MessageString(type, string_id, message, message2, message3, message4, message5, message6, message7, message8, message9, distance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ public:
|
||||
|
||||
//Actual Implementation Stuff
|
||||
|
||||
void RaidMessage_StringID(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
|
||||
void RaidMessageString(Mob* sender, uint32 type, uint32 string_id, const char* message,const char* message2=0,const char* message3=0,const char* message4=0,const char* message5=0,const char* message6=0,const char* message7=0,const char* message8=0,const char* message9=0, uint32 distance = 0);
|
||||
void CastGroupSpell(Mob* caster,uint16 spellid, uint32 gid);
|
||||
void SplitExp(uint32 exp, Mob* other);
|
||||
uint32 GetTotalRaidDamage(Mob* other);
|
||||
|
||||
@ -177,7 +177,7 @@ void Mob::DoSpecialAttackDamage(Mob *who, EQEmu::skills::SkillType skill, int32
|
||||
auto fbash = GetFuriousBash(itm->Focus.Effect);
|
||||
hate = hate * (100 + fbash) / 100;
|
||||
if (fbash)
|
||||
Message_StringID(Chat::Spells, GLOWS_RED, itm->Name);
|
||||
MessageString(Chat::Spells, GLOWS_RED, itm->Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -530,7 +530,7 @@ void Mob::TryBackstab(Mob *other, int ReuseTime) {
|
||||
if(IsClient()) {
|
||||
const EQEmu::ItemInstance *wpn = CastToClient()->GetInv().GetItem(EQEmu::invslot::slotPrimary);
|
||||
if (!wpn || (wpn->GetItem()->ItemType != EQEmu::item::ItemType1HPiercing)){
|
||||
Message_StringID(Chat::Red, BACKSTAB_WEAPON);
|
||||
MessageString(Chat::Red, BACKSTAB_WEAPON);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -720,11 +720,11 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
||||
float dist = DistanceSquared(m_Position, other->GetPosition());
|
||||
if(dist > range) {
|
||||
Log(Logs::Detail, Logs::Combat, "Ranged attack out of range... client should catch this. (%f > %f).\n", dist, range);
|
||||
Message_StringID(Chat::Red,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
MessageString(Chat::Red,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
return;
|
||||
}
|
||||
else if(dist < (RuleI(Combat, MinRangedAttackDist)*RuleI(Combat, MinRangedAttackDist))){
|
||||
Message_StringID(Chat::Yellow,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
MessageString(Chat::Yellow,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1273,11 +1273,11 @@ void Client::ThrowingAttack(Mob* other, bool CanDoubleAttack) { //old was 51
|
||||
float dist = DistanceSquared(m_Position, other->GetPosition());
|
||||
if(dist > range) {
|
||||
Log(Logs::Detail, Logs::Combat, "Throwing attack out of range... client should catch this. (%f > %f).\n", dist, range);
|
||||
Message_StringID(Chat::Red,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
MessageString(Chat::Red,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
return;
|
||||
}
|
||||
else if(dist < (RuleI(Combat, MinRangedAttackDist)*RuleI(Combat, MinRangedAttackDist))){
|
||||
Message_StringID(Chat::Yellow,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
MessageString(Chat::Yellow,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1566,7 +1566,7 @@ void NPC::DoClassAttacks(Mob *target) {
|
||||
//general stuff, for all classes....
|
||||
//only gets used when their primary ability get used too
|
||||
if (taunting && HasOwner() && target->IsNPC() && target->GetBodyType() != BT_Undead && taunt_time) {
|
||||
this->GetOwner()->Message_StringID(Chat::PetResponse, PET_TAUNTING);
|
||||
this->GetOwner()->MessageString(Chat::PetResponse, PET_TAUNTING);
|
||||
Taunt(target->CastToNPC(), false);
|
||||
}
|
||||
|
||||
@ -1898,7 +1898,7 @@ void Mob::Taunt(NPC *who, bool always_succeed, int chance_bonus, bool FromSpell,
|
||||
// Support for how taunt worked pre 2000 on LIVE - Can not taunt NPC over your level.
|
||||
if ((RuleB(Combat, TauntOverLevel) == false) && (level_difference < 0) ||
|
||||
who->GetSpecialAbility(IMMUNE_TAUNT)) {
|
||||
Message_StringID(Chat::SpellFailure, FAILED_TAUNT);
|
||||
MessageString(Chat::SpellFailure, FAILED_TAUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1955,10 +1955,10 @@ void Mob::Taunt(NPC *who, bool always_succeed, int chance_bonus, bool FromSpell,
|
||||
if (who->CanTalk())
|
||||
who->Say_StringID(SUCCESSFUL_TAUNT, GetCleanName());
|
||||
} else {
|
||||
Message_StringID(Chat::SpellFailure, FAILED_TAUNT);
|
||||
MessageString(Chat::SpellFailure, FAILED_TAUNT);
|
||||
}
|
||||
} else {
|
||||
Message_StringID(Chat::SpellFailure, FAILED_TAUNT);
|
||||
MessageString(Chat::SpellFailure, FAILED_TAUNT);
|
||||
}
|
||||
|
||||
if (HasSkillProcs())
|
||||
@ -2003,7 +2003,7 @@ void Mob::InstillDoubt(Mob *who) {
|
||||
SpellOnTarget(229, who, false, true, -2000);
|
||||
//is there a success message?
|
||||
} else {
|
||||
Message_StringID(Chat::LightBlue,NOT_SCARING);
|
||||
MessageString(Chat::LightBlue,NOT_SCARING);
|
||||
//Idea from WR:
|
||||
/* if (target->IsNPC() && zone->random.Int(0,99) < 10 ) {
|
||||
entity_list.MessageClose(target, false, 50, Chat::NPCRampage, "%s lashes out in anger!",target->GetName());
|
||||
@ -2033,8 +2033,9 @@ int Mob::TryHeadShot(Mob *defender, EQEmu::skills::SkillType skillInUse)
|
||||
chance = chance * norm / 100;
|
||||
chance += aabonuses.HeadShot[0] + spellbonuses.HeadShot[0] + itembonuses.HeadShot[0];
|
||||
if (zone->random.Int(1, 1000) <= chance) {
|
||||
entity_list.MessageClose_StringID(this, false, 200, Chat::MeleeCrit, FATAL_BOW_SHOT,
|
||||
GetName());
|
||||
entity_list.MessageCloseString(
|
||||
this, false, 200, Chat::MeleeCrit, FATAL_BOW_SHOT,
|
||||
GetName());
|
||||
return HeadShot_Dmg;
|
||||
}
|
||||
}
|
||||
@ -2078,8 +2079,9 @@ int Mob::TryAssassinate(Mob *defender, EQEmu::skills::SkillType skillInUse)
|
||||
|
||||
if (Assassinate_Dmg && Assassinate_Level && (defender->GetLevel() <= Assassinate_Level)) {
|
||||
if (zone->random.Int(1, 1000) <= chance) {
|
||||
entity_list.MessageClose_StringID(this, false, 200, Chat::MeleeCrit, ASSASSINATES,
|
||||
GetName());
|
||||
entity_list.MessageCloseString(
|
||||
this, false, 200, Chat::MeleeCrit, ASSASSINATES,
|
||||
GetName());
|
||||
return Assassinate_Dmg;
|
||||
}
|
||||
}
|
||||
|
||||
@ -471,7 +471,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if(zone->random.Roll(RuleI(Spells, SuccorFailChance))) { //2% Fail chance by default
|
||||
|
||||
if(IsClient()) {
|
||||
CastToClient()->Message_StringID(Chat::SpellFailure,SUCCOR_FAIL);
|
||||
CastToClient()->MessageString(Chat::SpellFailure,SUCCOR_FAIL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -703,7 +703,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
(caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))))
|
||||
{
|
||||
if (caster)
|
||||
caster->Message_StringID(Chat::SpellFailure, IMMUNE_STUN);
|
||||
caster->MessageString(Chat::SpellFailure, IMMUNE_STUN);
|
||||
} else {
|
||||
int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
|
||||
if (IsClient())
|
||||
@ -718,7 +718,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
Stun(effect_value);
|
||||
} else {
|
||||
if (IsClient())
|
||||
Message_StringID(Chat::Stun, SHAKE_OFF_STUN);
|
||||
MessageString(Chat::Stun, SHAKE_OFF_STUN);
|
||||
|
||||
Log(Logs::Detail, Logs::Combat, "Stun Resisted. We had %d percent resist chance.", stun_resist);
|
||||
}
|
||||
@ -847,14 +847,14 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
if(ClosestMob)
|
||||
{
|
||||
Message_StringID(Chat::Spells, MessageID);
|
||||
MessageString(Chat::Spells, MessageID);
|
||||
SetHeading(CalculateHeadingToTarget(ClosestMob->GetX(), ClosestMob->GetY()));
|
||||
SetTarget(ClosestMob);
|
||||
CastToClient()->SendTargetCommand(ClosestMob->GetID());
|
||||
SentPositionPacket(0.0f, 0.0f, 0.0f, 0.0f, 0, true);
|
||||
}
|
||||
else
|
||||
Message_StringID(Chat::Red, SENSE_NOTHING);
|
||||
MessageString(Chat::Red, SENSE_NOTHING);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -939,14 +939,14 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
{
|
||||
if(!zone->CanBind())
|
||||
{
|
||||
Message_StringID(Chat::SpellFailure, CANNOT_BIND);
|
||||
MessageString(Chat::SpellFailure, CANNOT_BIND);
|
||||
break;
|
||||
}
|
||||
if(!zone->IsCity())
|
||||
{
|
||||
if(caster != this)
|
||||
{
|
||||
Message_StringID(Chat::SpellFailure, CANNOT_BIND);
|
||||
MessageString(Chat::SpellFailure, CANNOT_BIND);
|
||||
break;
|
||||
}
|
||||
else
|
||||
@ -1039,7 +1039,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if(zone->random.Roll(effect_value))
|
||||
Gate(spells[spell_id].base2[i] - 1);
|
||||
else if (caster)
|
||||
caster->Message_StringID(Chat::SpellFailure,GATE_FAIL);
|
||||
caster->MessageString(Chat::SpellFailure,GATE_FAIL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1051,7 +1051,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
#endif
|
||||
if(GetSpecialAbility(UNDISPELLABLE)){
|
||||
if (caster)
|
||||
caster->Message_StringID(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
|
||||
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1077,7 +1077,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
#endif
|
||||
if(GetSpecialAbility(UNDISPELLABLE)){
|
||||
if (caster)
|
||||
caster->Message_StringID(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
|
||||
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1103,7 +1103,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
#endif
|
||||
if(GetSpecialAbility(UNDISPELLABLE)){
|
||||
if (caster)
|
||||
caster->Message_StringID(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
|
||||
caster->MessageString(Chat::SpellFailure, SPELL_NO_EFFECT, spells[spell_id].name);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1235,7 +1235,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
#endif
|
||||
if(GetPet())
|
||||
{
|
||||
Message_StringID(Chat::Shout, ONLY_ONE_PET);
|
||||
MessageString(Chat::Shout, ONLY_ONE_PET);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1537,7 +1537,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
&& caster && (!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity)))))
|
||||
{
|
||||
if (caster)
|
||||
caster->Message_StringID(Chat::Shout, IMMUNE_STUN);
|
||||
caster->MessageString(Chat::Shout, IMMUNE_STUN);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1627,7 +1627,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
if (zone->random.Int(0, 99) > spells[spell_id].base[i]) {
|
||||
CastToClient()->SetFeigned(false);
|
||||
entity_list.MessageClose_StringID(this, false, 200, 10, STRING_FEIGNFAILED, GetName());
|
||||
entity_list.MessageCloseString(this, false, 200, 10, STRING_FEIGNFAILED, GetName());
|
||||
} else {
|
||||
CastToClient()->SetFeigned(true);
|
||||
}
|
||||
@ -1644,12 +1644,12 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
{
|
||||
if(caster == this)
|
||||
{
|
||||
Message_StringID(Chat::Spells,
|
||||
MessageString(Chat::Spells,
|
||||
SENTINEL_TRIG_YOU);
|
||||
}
|
||||
else
|
||||
{
|
||||
caster->Message_StringID(Chat::Spells,
|
||||
caster->MessageString(Chat::Spells,
|
||||
SENTINEL_TRIG_OTHER, GetCleanName());
|
||||
}
|
||||
}
|
||||
@ -1790,26 +1790,26 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
Corpse *corpse = entity_list.GetCorpseByOwner(TargetClient);
|
||||
if(corpse) {
|
||||
if(TargetClient == this->CastToClient())
|
||||
Message_StringID(Chat::LightBlue, SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
|
||||
MessageString(Chat::LightBlue, SUMMONING_CORPSE, TargetClient->CastToMob()->GetCleanName());
|
||||
else
|
||||
Message_StringID(Chat::LightBlue, SUMMONING_CORPSE_OTHER, TargetClient->CastToMob()->GetCleanName());
|
||||
MessageString(Chat::LightBlue, SUMMONING_CORPSE_OTHER, TargetClient->CastToMob()->GetCleanName());
|
||||
|
||||
corpse->Summon(CastToClient(), true, true);
|
||||
}
|
||||
else {
|
||||
// No corpse found in the zone
|
||||
Message_StringID(Chat::LightBlue, CORPSE_CANT_SENSE);
|
||||
MessageString(Chat::LightBlue, CORPSE_CANT_SENSE);
|
||||
}
|
||||
}
|
||||
else if (caster) {
|
||||
char level[4];
|
||||
ConvertArray(effect_value, level);
|
||||
caster->Message_StringID(Chat::SpellFailure,
|
||||
caster->MessageString(Chat::SpellFailure,
|
||||
SPELL_LEVEL_REQ, level);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::LightBlue, TARGET_NOT_FOUND);
|
||||
MessageString(Chat::LightBlue, TARGET_NOT_FOUND);
|
||||
Log(Logs::General, Logs::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id);
|
||||
}
|
||||
}
|
||||
@ -2725,7 +2725,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
case SE_MassGroupBuff:{
|
||||
|
||||
SetMGB(true);
|
||||
Message_StringID(Chat::Disciplines, MGB_STRING);
|
||||
MessageString(Chat::Disciplines, MGB_STRING);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3643,7 +3643,7 @@ void Mob::DoBuffTic(const Buffs_Struct &buff, int slot, Mob *caster)
|
||||
case SE_Invisibility2:
|
||||
case SE_InvisVsUndead2: {
|
||||
if (buff.ticsremaining <= 3 && buff.ticsremaining > 1) {
|
||||
Message_StringID(Chat::Spells, INVIS_BEGIN_BREAK);
|
||||
MessageString(Chat::Spells, INVIS_BEGIN_BREAK);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -4047,7 +4047,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
if(p->IsPet())
|
||||
notify = p->GetOwner();
|
||||
if(p) {
|
||||
notify->Message_StringID(Chat::SpellWornOff, SPELL_WORN_OFF_OF,
|
||||
notify->MessageString(Chat::SpellWornOff, SPELL_WORN_OFF_OF,
|
||||
spells[buffs[slot].spellid].name, GetCleanName());
|
||||
}
|
||||
}
|
||||
@ -5406,7 +5406,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Message_StringID(Chat::Spells, string_id, UsedItem->Name);
|
||||
MessageString(Chat::Spells, string_id, UsedItem->Name);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5814,9 +5814,15 @@ bool Mob::TryDeathSave() {
|
||||
Message(263, "The gods have healed you for %i points of damage.", HealAmt);
|
||||
|
||||
if(spellbonuses.DeathSave[0] == 2)
|
||||
entity_list.MessageClose_StringID(this, false, 200, Chat::MeleeCrit, DIVINE_INTERVENTION, GetCleanName());
|
||||
entity_list.MessageCloseString(
|
||||
this,
|
||||
false,
|
||||
200,
|
||||
Chat::MeleeCrit,
|
||||
DIVINE_INTERVENTION,
|
||||
GetCleanName());
|
||||
else
|
||||
entity_list.MessageClose_StringID(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
|
||||
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
|
||||
|
||||
SendHPUpdate();
|
||||
BuffFadeBySlot(buffSlot);
|
||||
@ -5847,9 +5853,15 @@ bool Mob::TryDeathSave() {
|
||||
Message(263, "The gods have healed you for %i points of damage.", HealAmt);
|
||||
|
||||
if(spellbonuses.DeathSave[0] == 2)
|
||||
entity_list.MessageClose_StringID(this, false, 200, Chat::MeleeCrit, DIVINE_INTERVENTION, GetCleanName());
|
||||
entity_list.MessageCloseString(
|
||||
this,
|
||||
false,
|
||||
200,
|
||||
Chat::MeleeCrit,
|
||||
DIVINE_INTERVENTION,
|
||||
GetCleanName());
|
||||
else
|
||||
entity_list.MessageClose_StringID(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
|
||||
entity_list.MessageCloseString(this, false, 200, Chat::MeleeCrit, DEATH_PACT, GetCleanName());
|
||||
|
||||
SendHPUpdate();
|
||||
BuffFadeBySlot(buffSlot);
|
||||
@ -6802,11 +6814,11 @@ void Client::BreakFeignDeathWhenCastOn(bool IsResisted)
|
||||
chance *= 2;
|
||||
|
||||
if(chance && (zone->random.Roll(chance))){
|
||||
Message_StringID(Chat::SpellFailure,FD_CAST_ON_NO_BREAK);
|
||||
MessageString(Chat::SpellFailure,FD_CAST_ON_NO_BREAK);
|
||||
return;
|
||||
}
|
||||
|
||||
SetFeigned(false);
|
||||
Message_StringID(Chat::SpellFailure,FD_CAST_ON);
|
||||
MessageString(Chat::SpellFailure,FD_CAST_ON);
|
||||
}
|
||||
}
|
||||
|
||||
194
zone/spells.cpp
194
zone/spells.cpp
@ -180,9 +180,9 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
Log(Logs::Detail, Logs::Spells, "Spell casting canceled: not able to cast now. Valid? %d, casting %d, waiting? %d, spellend? %d, stunned? %d, feared? %d, mezed? %d, silenced? %d, amnesiad? %d",
|
||||
IsValidSpell(spell_id), casting_spell_id, delaytimer, spellend_timer.Enabled(), IsStunned(), IsFeared(), IsMezzed(), IsSilenced(), IsAmnesiad() );
|
||||
if(IsSilenced() && !IsDiscipline(spell_id))
|
||||
Message_StringID(Chat::Red, SILENCED_STRING);
|
||||
MessageString(Chat::Red, SILENCED_STRING);
|
||||
if(IsAmnesiad() && IsDiscipline(spell_id))
|
||||
Message_StringID(Chat::Red, MELEE_SILENCE);
|
||||
MessageString(Chat::Red, MELEE_SILENCE);
|
||||
if(IsClient())
|
||||
CastToClient()->SendSpellBarEnable(spell_id);
|
||||
if(casting_spell_id && IsNPC())
|
||||
@ -197,7 +197,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
int chance = CastToClient()->GetFocusEffect(focusFcMute, spell_id);//Client only
|
||||
|
||||
if (zone->random.Roll(chance)) {
|
||||
Message_StringID(Chat::Red, SILENCED_STRING);
|
||||
MessageString(Chat::Red, SILENCED_STRING);
|
||||
if(IsClient())
|
||||
CastToClient()->SendSpellBarEnable(spell_id);
|
||||
return(false);
|
||||
@ -205,7 +205,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
}
|
||||
|
||||
if(IsDetrimentalSpell(spell_id) && !zone->CanDoCombat()){
|
||||
Message_StringID(Chat::Red, SPELL_WOULDNT_HOLD);
|
||||
MessageString(Chat::Red, SPELL_WOULDNT_HOLD);
|
||||
if(IsClient())
|
||||
CastToClient()->SendSpellBarEnable(spell_id);
|
||||
if(casting_spell_id && IsNPC())
|
||||
@ -257,7 +257,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking equip-only item with an invalid class");
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::Red, MUST_EQUIP_ITEM);
|
||||
MessageString(Chat::Red, MUST_EQUIP_ITEM);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
@ -276,7 +276,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
}
|
||||
else
|
||||
{
|
||||
Message_StringID(Chat::Red, CANNOT_USE_ITEM);
|
||||
MessageString(Chat::Red, CANNOT_USE_ITEM);
|
||||
}
|
||||
}
|
||||
return(false);
|
||||
@ -289,7 +289,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking equip-only item without equiping it");
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::Red, MUST_EQUIP_ITEM);
|
||||
MessageString(Chat::Red, MUST_EQUIP_ITEM);
|
||||
}
|
||||
return(false);
|
||||
}
|
||||
@ -370,12 +370,12 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
Mob::SetMana(GetMana() - use_mana); // We send StopCasting which will update mana
|
||||
StopCasting();
|
||||
|
||||
Message_StringID(Chat::SpellFailure, fizzle_msg);
|
||||
MessageString(Chat::SpellFailure, fizzle_msg);
|
||||
|
||||
/**
|
||||
* Song Failure message
|
||||
*/
|
||||
entity_list.FilteredMessageClose_StringID(
|
||||
entity_list.FilteredMessageCloseString(
|
||||
this,
|
||||
true,
|
||||
RuleI(Range, SpellMessages),
|
||||
@ -428,7 +428,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
Log(Logs::Detail, Logs::Spells, "Spell Error: no target. spell=%d", spell_id);
|
||||
if(IsClient()) {
|
||||
//clients produce messages... npcs should not for this case
|
||||
Message_StringID(Chat::Red, SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red, SPELL_NEED_TAR);
|
||||
InterruptSpell();
|
||||
} else {
|
||||
InterruptSpell(0, 0, 0); //the 0 args should cause no messages
|
||||
@ -461,7 +461,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
Log(Logs::Detail, Logs::Spells, "Spell Error not enough mana spell=%d mymana=%d cost=%d\n", spell_id, my_curmana, mana_cost);
|
||||
if(IsClient()) {
|
||||
//clients produce messages... npcs should not for this case
|
||||
Message_StringID(Chat::Red, INSUFFICIENT_MANA);
|
||||
MessageString(Chat::Red, INSUFFICIENT_MANA);
|
||||
InterruptSpell();
|
||||
} else {
|
||||
InterruptSpell(0, 0, 0); //the 0 args should cause no messages
|
||||
@ -518,7 +518,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
if (IsClient() && slot == CastingSlot::Item && item_slot != 0xFFFFFFFF) {
|
||||
auto item = CastToClient()->GetInv().GetItem(item_slot);
|
||||
if (item && item->GetItem())
|
||||
Message_StringID(Chat::Spells, BEGINS_TO_GLOW, item->GetItem()->Name);
|
||||
MessageString(Chat::Spells, BEGINS_TO_GLOW, item->GetItem()->Name);
|
||||
}
|
||||
|
||||
if (!DoCastingChecks()) {
|
||||
@ -575,13 +575,13 @@ bool Mob::DoCastingChecks()
|
||||
if (spell_target && spells[spell_id].targettype != ST_Self && !spell_target->CheckSpellLevelRestriction(spell_id)) {
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
|
||||
if (!IsBardSong(spell_id))
|
||||
Message_StringID(Chat::SpellFailure, SPELL_TOO_POWERFUL);
|
||||
MessageString(Chat::SpellFailure, SPELL_TOO_POWERFUL);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()) {
|
||||
Message_StringID(Chat::Red, CAST_OUTDOORS);
|
||||
MessageString(Chat::Red, CAST_OUTDOORS);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -680,7 +680,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
|
||||
if (GetRawSkill(EQEmu::skills::SkillPercussionInstruments) > 0) // no skill increases if not trained in the instrument
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillPercussionInstruments, nullptr, -15);
|
||||
else
|
||||
Message_StringID(Chat::Red,NO_INSTRUMENT_SKILL); // tell the client that they need instrument training
|
||||
MessageString(Chat::Red,NO_INSTRUMENT_SKILL); // tell the client that they need instrument training
|
||||
}
|
||||
else
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillSinging, nullptr, -15);
|
||||
@ -690,7 +690,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
|
||||
if (GetRawSkill(EQEmu::skills::SkillStringedInstruments) > 0)
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillStringedInstruments, nullptr, -15);
|
||||
else
|
||||
Message_StringID(Chat::Red,NO_INSTRUMENT_SKILL);
|
||||
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
|
||||
}
|
||||
else
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillSinging, nullptr, -15);
|
||||
@ -700,7 +700,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
|
||||
if (GetRawSkill(EQEmu::skills::SkillWindInstruments) > 0)
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillWindInstruments, nullptr, -15);
|
||||
else
|
||||
Message_StringID(Chat::Red,NO_INSTRUMENT_SKILL);
|
||||
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
|
||||
}
|
||||
else
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillSinging, nullptr, -15);
|
||||
@ -710,7 +710,7 @@ void Client::CheckSongSkillIncrease(uint16 spell_id){
|
||||
if (GetRawSkill(EQEmu::skills::SkillBrassInstruments) > 0)
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillBrassInstruments, nullptr, -15);
|
||||
else
|
||||
Message_StringID(Chat::Red,NO_INSTRUMENT_SKILL);
|
||||
MessageString(Chat::Red,NO_INSTRUMENT_SKILL);
|
||||
}
|
||||
else
|
||||
CheckIncreaseSkill(EQEmu::skills::SkillSinging, nullptr, -15);
|
||||
@ -861,7 +861,7 @@ void Mob::InterruptSpell(uint16 message, uint16 color, uint16 spellid)
|
||||
}
|
||||
|
||||
if(casting_spell_aa_id && IsClient()) { //Rest AA Timer on failed cast
|
||||
CastToClient()->Message_StringID(Chat::SpellFailure, ABILITY_FAILED);
|
||||
CastToClient()->MessageString(Chat::SpellFailure, ABILITY_FAILED);
|
||||
CastToClient()->ResetAlternateAdvancementTimer(casting_spell_aa_id);
|
||||
}
|
||||
|
||||
@ -940,7 +940,7 @@ void Mob::StopCasting()
|
||||
if (IsClient()) {
|
||||
auto c = CastToClient();
|
||||
if (casting_spell_aa_id) { //Rest AA Timer on failed cast
|
||||
c->Message_StringID(Chat::SpellFailure, ABILITY_FAILED);
|
||||
c->MessageString(Chat::SpellFailure, ABILITY_FAILED);
|
||||
c->ResetAlternateAdvancementTimer(casting_spell_aa_id);
|
||||
}
|
||||
|
||||
@ -969,7 +969,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
if(IsClient() && slot != CastingSlot::Item && slot != CastingSlot::PotionBelt && spells[spell_id].recast_time > 1000) { // 10 is item
|
||||
if(!CastToClient()->GetPTimers().Expired(&database, pTimerSpellStart + spell_id, false)) {
|
||||
//should we issue a message or send them a spell gem packet?
|
||||
Message_StringID(Chat::Red, SPELL_RECAST);
|
||||
MessageString(Chat::Red, SPELL_RECAST);
|
||||
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: spell reuse timer not expired", spell_id);
|
||||
StopCasting();
|
||||
return;
|
||||
@ -983,7 +983,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
if(itm && itm->GetItem()->RecastDelay > 0)
|
||||
{
|
||||
if(!CastToClient()->GetPTimers().Expired(&database, (pTimerItemStart + itm->GetItem()->RecastType), false)) {
|
||||
Message_StringID(Chat::Red, SPELL_RECAST);
|
||||
MessageString(Chat::Red, SPELL_RECAST);
|
||||
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: item spell reuse timer not expired", spell_id);
|
||||
StopCasting();
|
||||
return;
|
||||
@ -1015,7 +1015,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
if (casting_spell_id != spell_id)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: already casting", spell_id);
|
||||
Message_StringID(Chat::Red,ALREADY_CASTING);
|
||||
MessageString(Chat::Red,ALREADY_CASTING);
|
||||
InterruptSpell();
|
||||
return;
|
||||
}
|
||||
@ -1133,8 +1133,14 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
}
|
||||
// if we got here, we regained concentration
|
||||
regain_conc = true;
|
||||
Message_StringID(Chat::Spells, REGAIN_AND_CONTINUE);
|
||||
entity_list.MessageClose_StringID(this, true, RuleI(Range, SpellMessages), Chat::Spells, OTHER_REGAIN_CAST, this->GetCleanName());
|
||||
MessageString(Chat::Spells, REGAIN_AND_CONTINUE);
|
||||
entity_list.MessageCloseString(
|
||||
this,
|
||||
true,
|
||||
RuleI(Range, SpellMessages),
|
||||
Chat::Spells,
|
||||
OTHER_REGAIN_CAST,
|
||||
this->GetCleanName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1170,7 +1176,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
case 13000:
|
||||
if(itembonuses.percussionMod == 0) { // check for the appropriate instrument type
|
||||
HasInstrument = false;
|
||||
c->Message_StringID(Chat::Red, SONG_NEEDS_DRUM); // send an error message if missing
|
||||
c->MessageString(Chat::Red, SONG_NEEDS_DRUM); // send an error message if missing
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1178,7 +1184,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
case 13001:
|
||||
if(itembonuses.windMod == 0) {
|
||||
HasInstrument = false;
|
||||
c->Message_StringID(Chat::Red, SONG_NEEDS_WIND);
|
||||
c->MessageString(Chat::Red, SONG_NEEDS_WIND);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1186,7 +1192,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
case 13011:
|
||||
if(itembonuses.stringedMod == 0) {
|
||||
HasInstrument = false;
|
||||
c->Message_StringID(Chat::Red, SONG_NEEDS_STRINGS);
|
||||
c->MessageString(Chat::Red, SONG_NEEDS_STRINGS);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1194,7 +1200,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
case 13012:
|
||||
if(itembonuses.brassMod == 0) {
|
||||
HasInstrument = false;
|
||||
c->Message_StringID(Chat::Red, SONG_NEEDS_BRASS);
|
||||
c->MessageString(Chat::Red, SONG_NEEDS_BRASS);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1222,13 +1228,13 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
{
|
||||
if (!missingreags)
|
||||
{
|
||||
c->Message_StringID(Chat::Red, MISSING_SPELL_COMP);
|
||||
c->MessageString(Chat::Red, MISSING_SPELL_COMP);
|
||||
missingreags=true;
|
||||
}
|
||||
|
||||
const EQEmu::ItemData *item = database.GetItem(component);
|
||||
if(item) {
|
||||
c->Message_StringID(Chat::Red, MISSING_SPELL_COMP_ITEM, item->Name);
|
||||
c->MessageString(Chat::Red, MISSING_SPELL_COMP_ITEM, item->Name);
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d: Canceled. Missing required reagent %s (%d)", spell_id, item->Name, component);
|
||||
}
|
||||
else {
|
||||
@ -1324,7 +1330,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, CastingSlot slo
|
||||
if(IsClient() && fromaug && recastdelay > 0)
|
||||
{
|
||||
if(!CastToClient()->GetPTimers().Expired(&database, (pTimerItemStart + recasttype), false)) {
|
||||
Message_StringID(Chat::Red, SPELL_RECAST);
|
||||
MessageString(Chat::Red, SPELL_RECAST);
|
||||
Log(Logs::Detail, Logs::Spells, "Casting of %d canceled: item spell reuse timer not expired", spell_id);
|
||||
StopCasting();
|
||||
return;
|
||||
@ -1502,7 +1508,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
targetType = ST_Target;
|
||||
|
||||
if (spell_target && !spell_target->PassCastRestriction(true, spells[spell_id].CastRestriction)){
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1512,7 +1518,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if (spell_target &&
|
||||
((spell_target->IsNPC() && spell_target->IsEngaged()) ||
|
||||
(spell_target->IsClient() && spell_target->CastToClient()->GetAggroCount()))) {
|
||||
Message_StringID(Chat::Red, SPELL_NO_EFFECT); // Unsure correct string
|
||||
MessageString(Chat::Red, SPELL_NO_EFFECT); // Unsure correct string
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1520,9 +1526,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
else if (IsBeneficialSpell(spell_id)) {
|
||||
if ((IsNPC() && IsEngaged()) || (IsClient() && CastToClient()->GetAggroCount())) {
|
||||
if (IsDiscipline(spell_id))
|
||||
Message_StringID(Chat::Red, NO_ABILITY_IN_COMBAT);
|
||||
MessageString(Chat::Red, NO_ABILITY_IN_COMBAT);
|
||||
else
|
||||
Message_StringID(Chat::Red, NO_CAST_IN_COMBAT);
|
||||
MessageString(Chat::Red, NO_CAST_IN_COMBAT);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1535,7 +1541,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if (spell_target &&
|
||||
((spell_target->IsNPC() && !spell_target->IsEngaged()) ||
|
||||
(spell_target->IsClient() && !spell_target->CastToClient()->GetAggroCount()))) {
|
||||
Message_StringID(Chat::Red, SPELL_NO_EFFECT); // Unsure correct string
|
||||
MessageString(Chat::Red, SPELL_NO_EFFECT); // Unsure correct string
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1543,9 +1549,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
else if (IsBeneficialSpell(spell_id)) {
|
||||
if ((IsNPC() && !IsEngaged()) || (IsClient() && !CastToClient()->GetAggroCount())) {
|
||||
if (IsDiscipline(spell_id))
|
||||
Message_StringID(Chat::Red, NO_ABILITY_OUT_OF_COMBAT);
|
||||
MessageString(Chat::Red, NO_ABILITY_OUT_OF_COMBAT);
|
||||
else
|
||||
Message_StringID(Chat::Red, NO_CAST_OUT_OF_COMBAT);
|
||||
MessageString(Chat::Red, NO_CAST_OUT_OF_COMBAT);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1582,9 +1588,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
//invalid target
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target of body type %d (undead)", spell_id, mob_body);
|
||||
if(!spell_target)
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
else
|
||||
Message_StringID(Chat::Red,CANNOT_AFFECT_NPC);
|
||||
MessageString(Chat::Red,CANNOT_AFFECT_NPC);
|
||||
return false;
|
||||
}
|
||||
CastAction = SingleTarget;
|
||||
@ -1596,7 +1602,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
{
|
||||
//invalid target
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target of body type %d (summoned)", spell_id, mob_body);
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
return false;
|
||||
}
|
||||
CastAction = SingleTarget;
|
||||
@ -1611,7 +1617,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target of body type %d (summoned pet)",
|
||||
spell_id, mob_body);
|
||||
|
||||
Message_StringID(Chat::Red, SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red, SPELL_NEED_TAR);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1635,9 +1641,9 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
//invalid target
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target of body type %d (want body Type %d)", spell_id, mob_body, target_bt);
|
||||
if(!spell_target)
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
else
|
||||
Message_StringID(Chat::Red,CANNOT_AFFECT_NPC);
|
||||
MessageString(Chat::Red,CANNOT_AFFECT_NPC);
|
||||
return false;
|
||||
}
|
||||
CastAction = SingleTarget;
|
||||
@ -1652,7 +1658,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if(!spell_target)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (ldon object)", spell_id);
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
@ -1660,14 +1666,14 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if(!spell_target->IsNPC())
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (normal)", spell_id);
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(spell_target->GetClass() != LDON_TREASURE)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (normal)", spell_id);
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1676,7 +1682,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if(!spell_target)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (normal)", spell_id);
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
return false; // can't cast these unless we have a target
|
||||
}
|
||||
CastAction = SingleTarget;
|
||||
@ -1692,7 +1698,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if(!spell_target) message = SPELL_NEED_TAR;
|
||||
else if(!spell_target->IsCorpse()) message = ONLY_ON_CORPSES;
|
||||
else if(!spell_target->IsPlayerCorpse()) message = CORPSE_NOT_VALID;
|
||||
Message_StringID(Chat::Red, message);
|
||||
MessageString(Chat::Red, message);
|
||||
return false;
|
||||
}
|
||||
CastAction = SingleTarget;
|
||||
@ -1704,7 +1710,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if(!spell_target)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (no pet)", spell_id);
|
||||
Message_StringID(Chat::Red,NO_PET);
|
||||
MessageString(Chat::Red,NO_PET);
|
||||
return false; // can't cast these unless we have a target
|
||||
}
|
||||
CastAction = SingleTarget;
|
||||
@ -1775,7 +1781,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if(!spell_target)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (AOE)", spell_id);
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
return false;
|
||||
}
|
||||
ae_center = spell_target;
|
||||
@ -1800,7 +1806,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
}
|
||||
|
||||
if (spell_target && spell_target->IsPet() && spells[spell_id].targettype == ST_GroupNoPets){
|
||||
Message_StringID(Chat::Red,NO_CAST_ON_PET);
|
||||
MessageString(Chat::Red,NO_CAST_ON_PET);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1812,7 +1818,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if(!spell_target)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: invalid target (Group Required: Single Target)", spell_id);
|
||||
Message_StringID(Chat::Red,SPELL_NEED_TAR);
|
||||
MessageString(Chat::Red,SPELL_NEED_TAR);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1929,14 +1935,14 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
||||
if(group_id_caster == 0 || group_id_target == 0)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: Attempted to cast a Single Target Group spell on a ungrouped member.", spell_id);
|
||||
Message_StringID(Chat::Red, TARGET_GROUP_MEMBER);
|
||||
MessageString(Chat::Red, TARGET_GROUP_MEMBER);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(group_id_caster != group_id_target)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d canceled: Attempted to cast a Single Target Group spell on a ungrouped member.", spell_id);
|
||||
Message_StringID(Chat::Red, TARGET_GROUP_MEMBER);
|
||||
MessageString(Chat::Red, TARGET_GROUP_MEMBER);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2030,7 +2036,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
|
||||
if( spells[spell_id].zonetype == 1 && !zone->CanCastOutdoor()){
|
||||
if(IsClient()){
|
||||
if(!CastToClient()->GetGM()){
|
||||
Message_StringID(Chat::Red, CAST_OUTDOORS);
|
||||
MessageString(Chat::Red, CAST_OUTDOORS);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2112,14 +2118,14 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
|
||||
if(!spells[spell_id].npc_no_los && spell_target && IsDetrimentalSpell(spell_id) && !CheckLosFN(spell_target) && !IsHarmonySpell(spell_id) && spells[spell_id].targettype != ST_TargetOptional)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d: cannot see target %s", spell_id, spell_target->GetName());
|
||||
Message_StringID(Chat::Red,CANT_SEE_TARGET);
|
||||
MessageString(Chat::Red,CANT_SEE_TARGET);
|
||||
return false;
|
||||
}
|
||||
|
||||
// check to see if target is a caster mob before performing a mana tap
|
||||
if(spell_target && IsManaTapSpell(spell_id)) {
|
||||
if(spell_target->GetCasterClass() == 'N') {
|
||||
Message_StringID(Chat::Red, TARGET_NO_MANA);
|
||||
MessageString(Chat::Red, TARGET_NO_MANA);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -2143,13 +2149,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
|
||||
if(dist2 > range2) {
|
||||
//target is out of range.
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d: Spell target is out of range (squared: %f > %f)", spell_id, dist2, range2);
|
||||
Message_StringID(Chat::Red, TARGET_OUT_OF_RANGE);
|
||||
MessageString(Chat::Red, TARGET_OUT_OF_RANGE);
|
||||
return(false);
|
||||
}
|
||||
else if (dist2 < min_range2){
|
||||
//target is too close range.
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d: Spell target is too close (squared: %f < %f)", spell_id, dist2, min_range2);
|
||||
Message_StringID(Chat::Red, TARGET_TOO_CLOSE);
|
||||
MessageString(Chat::Red, TARGET_TOO_CLOSE);
|
||||
return(false);
|
||||
}
|
||||
|
||||
@ -2164,13 +2170,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
|
||||
if(dist2 > range2) {
|
||||
//target is out of range.
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d: Spell target is out of range (squared: %f > %f)", spell_id, dist2, range2);
|
||||
Message_StringID(Chat::Red, TARGET_OUT_OF_RANGE);
|
||||
MessageString(Chat::Red, TARGET_OUT_OF_RANGE);
|
||||
return(false);
|
||||
}
|
||||
else if (dist2 < min_range2){
|
||||
//target is too close range.
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d: Spell target is too close (squared: %f < %f)", spell_id, dist2, min_range2);
|
||||
Message_StringID(Chat::Red, TARGET_TOO_CLOSE);
|
||||
MessageString(Chat::Red, TARGET_TOO_CLOSE);
|
||||
return(false);
|
||||
}
|
||||
|
||||
@ -2520,7 +2526,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, CastingSlot slo
|
||||
if(spell_target && IsDetrimentalSpell(spell_id) && !CheckLosFN(spell_target))
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Bard Song Pulse %d: cannot see target %s", spell_target->GetName());
|
||||
Message_StringID(Chat::Red, CANT_SEE_TARGET);
|
||||
MessageString(Chat::Red, CANT_SEE_TARGET);
|
||||
return(false);
|
||||
}
|
||||
|
||||
@ -2535,7 +2541,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, CastingSlot slo
|
||||
if(dist2 > range2) {
|
||||
//target is out of range.
|
||||
Log(Logs::Detail, Logs::Spells, "Bard Song Pulse %d: Spell target is out of range (squared: %f > %f)", spell_id, dist2, range2);
|
||||
Message_StringID(Chat::Red, TARGET_OUT_OF_RANGE);
|
||||
MessageString(Chat::Red, TARGET_OUT_OF_RANGE);
|
||||
return(false);
|
||||
}
|
||||
}
|
||||
@ -2894,7 +2900,7 @@ int Mob::CheckStackConflict(uint16 spellid1, int caster_level1, uint16 spellid2,
|
||||
|
||||
if (spellbonuses.Screech == 1) {
|
||||
if (effect2 == SE_Screech && sp2.base[i] == -1) {
|
||||
Message_StringID(Chat::SpellFailure, SCREECH_BUFF_BLOCK, sp2.name);
|
||||
MessageString(Chat::SpellFailure, SCREECH_BUFF_BLOCK, sp2.name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -3425,7 +3431,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
|
||||
if(IsDetrimentalSpell(spell_id) && !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id)) {
|
||||
if(!IsClient() || !CastToClient()->GetGM()) {
|
||||
Message_StringID(Chat::SpellFailure, SPELL_NO_HOLD);
|
||||
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -3590,7 +3596,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
{
|
||||
if(spelltar->invisible)
|
||||
{
|
||||
spelltar->Message_StringID(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
@ -3600,7 +3606,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
{
|
||||
if(spelltar->invisible_undead)
|
||||
{
|
||||
spelltar->Message_StringID(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
@ -3610,7 +3616,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
{
|
||||
if(spelltar->invisible_animals)
|
||||
{
|
||||
spelltar->Message_StringID(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
spelltar->MessageString(Chat::SpellFailure, ALREADY_INVIS, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
@ -3690,7 +3696,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
Log(Logs::Detail, Logs::Spells, "Beneficial ae bard song %d can't take hold %s -> %s, IBA? %d", spell_id, GetName(), spelltar->GetName(), IsBeneficialAllowed(spelltar));
|
||||
} else {
|
||||
Log(Logs::Detail, Logs::Spells, "Beneficial spell %d can't take hold %s -> %s, IBA? %d", spell_id, GetName(), spelltar->GetName(), IsBeneficialAllowed(spelltar));
|
||||
Message_StringID(Chat::SpellFailure, SPELL_NO_HOLD);
|
||||
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
|
||||
}
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
@ -3700,7 +3706,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
else if ( !IsAttackAllowed(spelltar, true) && !IsResurrectionEffects(spell_id)) // Detrimental spells - PVP check
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Detrimental spell %d can't take hold %s -> %s", spell_id, GetName(), spelltar->GetName());
|
||||
spelltar->Message_StringID(Chat::SpellFailure, YOU_ARE_PROTECTED, GetCleanName());
|
||||
spelltar->MessageString(Chat::SpellFailure, YOU_ARE_PROTECTED, GetCleanName());
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
@ -3737,7 +3743,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
focus = CalcFocusEffect(focusBlockNextSpell, buffs[b].spellid, spell_id);
|
||||
if(focus) {
|
||||
CheckNumHitsRemaining(NumHit::MatchingSpells, b);
|
||||
Message_StringID(Chat::SpellFailure, SPELL_WOULDNT_HOLD);
|
||||
MessageString(Chat::SpellFailure, SPELL_WOULDNT_HOLD);
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
@ -3786,7 +3792,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
if (reflect_chance) {
|
||||
|
||||
if (RuleB(Spells, ReflectMessagesClose)) {
|
||||
entity_list.MessageClose_StringID(
|
||||
entity_list.MessageCloseString(
|
||||
this, /* Sender */
|
||||
false, /* Skip Sender */
|
||||
RuleI(Range, SpellMessages), /* Range */
|
||||
@ -3797,7 +3803,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::Spells, SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
|
||||
MessageString(Chat::Spells, SPELL_REFLECT, GetCleanName(), spelltar->GetCleanName());
|
||||
}
|
||||
|
||||
CheckNumHitsRemaining(NumHit::ReflectSpell);
|
||||
@ -3829,12 +3835,12 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d was completely resisted by %s", spell_id, spelltar->GetName());
|
||||
|
||||
if (spells[spell_id].resisttype == RESIST_PHYSICAL){
|
||||
Message_StringID(Chat::SpellFailure, PHYSICAL_RESIST_FAIL,spells[spell_id].name);
|
||||
spelltar->Message_StringID(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
|
||||
MessageString(Chat::SpellFailure, PHYSICAL_RESIST_FAIL,spells[spell_id].name);
|
||||
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
|
||||
}
|
||||
else {
|
||||
Message_StringID(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
|
||||
spelltar->Message_StringID(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
|
||||
MessageString(Chat::SpellFailure, TARGET_RESISTED, spells[spell_id].name);
|
||||
spelltar->MessageString(Chat::SpellFailure, YOU_RESIST, spells[spell_id].name);
|
||||
}
|
||||
|
||||
if (spelltar->IsAIControlled()) {
|
||||
@ -3899,7 +3905,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d failed: recipient did not meet the level restrictions", spell_id);
|
||||
if(!IsBardSong(spell_id))
|
||||
Message_StringID(Chat::SpellFailure, SPELL_TOO_POWERFUL);
|
||||
MessageString(Chat::SpellFailure, SPELL_TOO_POWERFUL);
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
@ -3911,7 +3917,7 @@ bool Mob::SpellOnTarget(uint16 spell_id, Mob *spelltar, bool reflect, bool use_r
|
||||
// spell. It's most likely a buff that can't stack.
|
||||
Log(Logs::Detail, Logs::Spells, "Spell %d could not apply its effects %s -> %s\n", spell_id, GetName(), spelltar->GetName());
|
||||
if(casting_spell_aa_id)
|
||||
Message_StringID(Chat::SpellFailure, SPELL_NO_HOLD);
|
||||
MessageString(Chat::SpellFailure, SPELL_NO_HOLD);
|
||||
safe_delete(action_packet);
|
||||
return false;
|
||||
}
|
||||
@ -3998,7 +4004,7 @@ void Corpse::CastRezz(uint16 spellid, Mob* Caster)
|
||||
/*
|
||||
if(!can_rez) {
|
||||
if(Caster && Caster->IsClient())
|
||||
Caster->Message_StringID(Chat::WhiteSmoke, CORPSE_TOO_OLD);
|
||||
Caster->MessageString(Chat::WhiteSmoke, CORPSE_TOO_OLD);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
@ -4226,7 +4232,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
{
|
||||
if(GetSpecialAbility(UNMEZABLE)) {
|
||||
Log(Logs::Detail, Logs::Spells, "We are immune to Mez spells.");
|
||||
caster->Message_StringID(Chat::SpellFailure, CANNOT_MEZ);
|
||||
caster->MessageString(Chat::SpellFailure, CANNOT_MEZ);
|
||||
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||
if(aggro > 0) {
|
||||
AddToHateList(caster, aggro);
|
||||
@ -4244,7 +4250,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
(!caster->IsNPC() || (caster->IsNPC() && !RuleB(Spells, NPCIgnoreBaseImmunity))))
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Our level (%d) is higher than the limit of this Mez spell (%d)", GetLevel(), spells[spell_id].max[effect_index]);
|
||||
caster->Message_StringID(Chat::SpellFailure, CANNOT_MEZ_WITH_SPELL);
|
||||
caster->MessageString(Chat::SpellFailure, CANNOT_MEZ_WITH_SPELL);
|
||||
AddToHateList(caster, 1,0,true,false,false,spell_id);
|
||||
return true;
|
||||
}
|
||||
@ -4254,7 +4260,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
if(GetSpecialAbility(UNSLOWABLE) && IsEffectInSpell(spell_id, SE_AttackSpeed))
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "We are immune to Slow spells.");
|
||||
caster->Message_StringID(Chat::Red, IMMUNE_ATKSPEED);
|
||||
caster->MessageString(Chat::Red, IMMUNE_ATKSPEED);
|
||||
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||
if(aggro > 0) {
|
||||
AddToHateList(caster, aggro);
|
||||
@ -4270,7 +4276,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
effect_index = GetSpellEffectIndex(spell_id, SE_Fear);
|
||||
if(GetSpecialAbility(UNFEARABLE)) {
|
||||
Log(Logs::Detail, Logs::Spells, "We are immune to Fear spells.");
|
||||
caster->Message_StringID(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
|
||||
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
|
||||
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||
if(aggro > 0) {
|
||||
AddToHateList(caster, aggro);
|
||||
@ -4281,13 +4287,13 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
} else if(IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false))
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Clients cannot fear eachother!");
|
||||
caster->Message_StringID(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
|
||||
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
|
||||
return true;
|
||||
}
|
||||
else if(GetLevel() > spells[spell_id].max[effect_index] && spells[spell_id].max[effect_index] != 0)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Level is %d, cannot be feared by this spell.", GetLevel());
|
||||
caster->Message_StringID(Chat::Shout, FEAR_TOO_HIGH);
|
||||
caster->MessageString(Chat::Shout, FEAR_TOO_HIGH);
|
||||
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||
if (aggro > 0) {
|
||||
AddToHateList(caster, aggro);
|
||||
@ -4300,7 +4306,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
{
|
||||
Message(Chat::Red, "Your are immune to fear.");
|
||||
Log(Logs::Detail, Logs::Spells, "Clients has WarCry effect, immune to fear!");
|
||||
caster->Message_StringID(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
|
||||
caster->MessageString(Chat::Red, IMMUNE_FEAR); // need to verify message type, not in MQ2Cast for easy look up
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -4310,7 +4316,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
if(GetSpecialAbility(UNCHARMABLE))
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "We are immune to Charm spells.");
|
||||
caster->Message_StringID(Chat::Red, CANNOT_CHARM); // need to verify message type, not in MQ2Cast for easy look up
|
||||
caster->MessageString(Chat::Red, CANNOT_CHARM); // need to verify message type, not in MQ2Cast for easy look up
|
||||
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||
if(aggro > 0) {
|
||||
AddToHateList(caster, aggro);
|
||||
@ -4336,7 +4342,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
if(GetLevel() > spells[spell_id].max[effect_index] && spells[spell_id].max[effect_index] != 0)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "Our level (%d) is higher than the limit of this Charm spell (%d)", GetLevel(), spells[spell_id].max[effect_index]);
|
||||
caster->Message_StringID(Chat::Red, CANNOT_CHARM_YET); // need to verify message type, not in MQ2Cast for easy look up<Paste>
|
||||
caster->MessageString(Chat::Red, CANNOT_CHARM_YET); // need to verify message type, not in MQ2Cast for easy look up<Paste>
|
||||
AddToHateList(caster, 1,0,true,false,false,spell_id);
|
||||
return true;
|
||||
}
|
||||
@ -4351,7 +4357,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
{
|
||||
if(GetSpecialAbility(UNSNAREABLE)) {
|
||||
Log(Logs::Detail, Logs::Spells, "We are immune to Snare spells.");
|
||||
caster->Message_StringID(Chat::Red, IMMUNE_MOVEMENT);
|
||||
caster->MessageString(Chat::Red, IMMUNE_MOVEMENT);
|
||||
int32 aggro = caster->CheckAggroAmount(spell_id, this);
|
||||
if(aggro > 0) {
|
||||
AddToHateList(caster, aggro);
|
||||
@ -4367,7 +4373,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
if(this == caster)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "You cannot lifetap yourself.");
|
||||
caster->Message_StringID(Chat::SpellFailure, CANT_DRAIN_SELF);
|
||||
caster->MessageString(Chat::SpellFailure, CANT_DRAIN_SELF);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -4377,7 +4383,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster)
|
||||
if(this == caster)
|
||||
{
|
||||
Log(Logs::Detail, Logs::Spells, "You cannot sacrifice yourself.");
|
||||
caster->Message_StringID(Chat::SpellFailure, CANNOT_SAC_SELF);
|
||||
caster->MessageString(Chat::SpellFailure, CANNOT_SAC_SELF);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,12 +304,12 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
||||
user->DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(in_combine->container_slot, 0), 0, true);
|
||||
container->Clear();
|
||||
user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQEmu::invslot::slotCursor, container->GetItem()->Icon, atoi(container->GetItem()->IDFile + 2));
|
||||
user->Message_StringID(Chat::LightBlue, TRANSFORM_COMPLETE, inst->GetItem()->Name);
|
||||
user->MessageString(Chat::LightBlue, TRANSFORM_COMPLETE, inst->GetItem()->Name);
|
||||
if (RuleB(Inventory, DeleteTransformationMold))
|
||||
user->DeleteItemInInventory(in_combine->container_slot, 0, true);
|
||||
}
|
||||
else if (inst) {
|
||||
user->Message_StringID(Chat::LightBlue, TRANSFORM_FAILED, inst->GetItem()->Name);
|
||||
user->MessageString(Chat::LightBlue, TRANSFORM_FAILED, inst->GetItem()->Name);
|
||||
}
|
||||
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
||||
user->QueuePacket(outapp);
|
||||
@ -324,10 +324,10 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
||||
user->DeleteItemInInventory(EQEmu::InventoryProfile::CalcSlotId(in_combine->container_slot, 0), 0, true);
|
||||
container->Clear();
|
||||
user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->GetAugmentItemID(5), inst->IsAttuned(), EQEmu::invslot::slotCursor, 0, 0);
|
||||
user->Message_StringID(Chat::LightBlue, TRANSFORM_COMPLETE, inst->GetItem()->Name);
|
||||
user->MessageString(Chat::LightBlue, TRANSFORM_COMPLETE, inst->GetItem()->Name);
|
||||
}
|
||||
else if (inst) {
|
||||
user->Message_StringID(Chat::LightBlue, DETRANSFORM_FAILED, inst->GetItem()->Name);
|
||||
user->MessageString(Chat::LightBlue, DETRANSFORM_FAILED, inst->GetItem()->Name);
|
||||
}
|
||||
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
||||
user->QueuePacket(outapp);
|
||||
@ -337,7 +337,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
||||
|
||||
DBTradeskillRecipe_Struct spec;
|
||||
if (!database.GetTradeRecipe(container, c_type, some_id, user->CharacterID(), &spec)) {
|
||||
user->Message_StringID(Chat::Emote,TRADESKILL_NOCOMBINE);
|
||||
user->MessageString(Chat::Emote,TRADESKILL_NOCOMBINE);
|
||||
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
||||
user->QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
@ -422,7 +422,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
||||
// Update Made count
|
||||
if (success) {
|
||||
if (!spec.has_learnt && ((spec.must_learn&0x10) != 0x10)) {
|
||||
user->Message_StringID(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
|
||||
user->MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
|
||||
}
|
||||
database.UpdateRecipeMadecount(spec.recipe_id, user->CharacterID(), spec.madecount+1);
|
||||
}
|
||||
@ -540,13 +540,13 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
|
||||
|
||||
safe_delete(outapp);
|
||||
|
||||
user->Message_StringID(Chat::Skills, TRADESKILL_MISSING_COMPONENTS);
|
||||
user->MessageString(Chat::Skills, TRADESKILL_MISSING_COMPONENTS);
|
||||
|
||||
for (auto it = MissingItems.begin(); it != MissingItems.end(); ++it) {
|
||||
const EQEmu::ItemData* item = database.GetItem(*it);
|
||||
|
||||
if(item)
|
||||
user->Message_StringID(Chat::Skills, TRADESKILL_MISSING_ITEM, item->Name);
|
||||
user->MessageString(Chat::Skills, TRADESKILL_MISSING_ITEM, item->Name);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -593,7 +593,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
|
||||
|
||||
if (success) {
|
||||
if (!spec.has_learnt && ((spec.must_learn & 0x10) != 0x10)) {
|
||||
user->Message_StringID(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
|
||||
user->MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, spec.name.c_str());
|
||||
}
|
||||
database.UpdateRecipeMadecount(spec.recipe_id, user->CharacterID(), spec.madecount+1);
|
||||
}
|
||||
@ -951,7 +951,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
// above critical still stands.
|
||||
// Mastery modifier is: 10%/25%/50% for rank one/two/three
|
||||
chance = 95.0f + (float(user_skill - spec->trivial) / 40.0f);
|
||||
Message_StringID(Chat::Emote, TRADESKILL_TRIVIAL);
|
||||
MessageString(Chat::Emote, TRADESKILL_TRIVIAL);
|
||||
} else if(chance < 5) {
|
||||
// Minimum chance is always 5
|
||||
chance = 5;
|
||||
@ -978,7 +978,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
if(over_trivial < 0)
|
||||
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
|
||||
|
||||
Message_StringID(Chat::LightBlue, TRADESKILL_SUCCEED, spec->name.c_str());
|
||||
MessageString(Chat::LightBlue, TRADESKILL_SUCCEED, spec->name.c_str());
|
||||
|
||||
Log(Logs::Detail, Logs::Tradeskills, "Tradeskill success");
|
||||
|
||||
@ -1010,7 +1010,7 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) {
|
||||
if(over_trivial < 0)
|
||||
CheckIncreaseTradeskill(bonusstat, stat_modifier, skillup_modifier, success_modifier, spec->tradeskill);
|
||||
|
||||
Message_StringID(Chat::Emote,TRADESKILL_FAILED);
|
||||
MessageString(Chat::Emote,TRADESKILL_FAILED);
|
||||
|
||||
Log(Logs::Detail, Logs::Tradeskills, "Tradeskill failed");
|
||||
if (this->GetGroup())
|
||||
@ -1404,7 +1404,7 @@ void Client::LearnRecipe(uint32 recipeID)
|
||||
if (row[1] != nullptr)
|
||||
return;
|
||||
|
||||
Message_StringID(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, row[0]);
|
||||
MessageString(Chat::LightBlue, TRADESKILL_LEARN_RECIPE, row[0]);
|
||||
// Actually learn the recipe now
|
||||
query = StringFormat("INSERT INTO char_recipe_list "
|
||||
"SET recipe_id = %u, char_id = %u, madecount = 0 "
|
||||
|
||||
@ -2475,7 +2475,7 @@ void Client::ShowBuyLines(const EQApplicationPacket *app) {
|
||||
QueuePacket(app);
|
||||
|
||||
if(bir->Approval == 0) {
|
||||
Message_StringID(Chat::Yellow, TRADER_BUSY);
|
||||
MessageString(Chat::Yellow, TRADER_BUSY);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -211,7 +211,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
else if (scm->queued == 2) // tell queue was full
|
||||
client->Tell_StringID(QUEUE_TELL_FULL, scm->to, scm->message);
|
||||
else if (scm->queued == 3) // person was offline
|
||||
client->Message_StringID(Chat::EchoTell, TOLD_NOT_ONLINE, scm->to);
|
||||
client->MessageString(Chat::EchoTell, TOLD_NOT_ONLINE, scm->to);
|
||||
else // normal tell echo "You told Soanso, 'something'"
|
||||
// tell echo doesn't use language, so it looks normal to you even if nobody can understand your tells
|
||||
client->ChannelMessageSend(scm->from, scm->to, scm->chan_num, 0, 100, scm->message);
|
||||
@ -414,7 +414,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
Client* client = entity_list.GetClientByID(wars->id);
|
||||
if (client) {
|
||||
if (pack->size == 64)//no results
|
||||
client->Message_StringID(Chat::White, WHOALL_NO_RESULTS);
|
||||
client->MessageString(Chat::White, WHOALL_NO_RESULTS);
|
||||
else {
|
||||
auto outapp = new EQApplicationPacket(OP_WhoAllResponse, pack->size);
|
||||
memcpy(outapp->pBuffer, pack->pBuffer, pack->size);
|
||||
@ -783,7 +783,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
Client* c = entity_list.GetClientByName(Rezzer);
|
||||
|
||||
if (c)
|
||||
c->Message_StringID(Chat::SpellWornOff, REZZ_ALREADY_PENDING);
|
||||
c->MessageString(Chat::SpellWornOff, REZZ_ALREADY_PENDING);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -1485,7 +1485,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
ServerOP_Consent_Struct* s = (ServerOP_Consent_Struct*)pack->pBuffer;
|
||||
Client* client = entity_list.GetClientByName(s->ownername);
|
||||
if (client) {
|
||||
client->Message_StringID(Chat::White, s->message_string_id);
|
||||
client->MessageString(Chat::White, s->message_string_id);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1729,7 +1729,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
if (c)
|
||||
{
|
||||
c->ClearPendingAdventureDoorClick();
|
||||
c->Message_StringID(Chat::Red, 5141);
|
||||
c->MessageString(Chat::Red, 5141);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -723,7 +723,7 @@ void Client::Gate(uint8 bindnum) {
|
||||
}
|
||||
|
||||
void NPC::Gate(uint8 bindnum) {
|
||||
entity_list.MessageClose_StringID(this, true, RuleI(Range, SpellMessages), Chat::Spells, GATES, GetCleanName());
|
||||
entity_list.MessageCloseString(this, true, RuleI(Range, SpellMessages), Chat::Spells, GATES, GetCleanName());
|
||||
|
||||
Mob::Gate(bindnum);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user