Unify chat constants usage

This commit is contained in:
Akkadius
2019-08-11 00:00:55 -05:00
parent 24d2a5723b
commit 57354579aa
50 changed files with 1352 additions and 1432 deletions
+15 -15
View File
@@ -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(MT_Spells, GLOWS_RED, itm->Name);
Message_StringID(Chat::Spells, GLOWS_RED, itm->Name);
}
}
}
@@ -283,7 +283,7 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk)
return;
if (!p_timers.Expired(&database, timer, false)) {
Message(13, "Ability recovery time not yet met.");
Message(Chat::Red, "Ability recovery time not yet met.");
return;
}
@@ -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(13, BACKSTAB_WEAPON);
Message_StringID(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(13,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
Message_StringID(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(15,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
Message_StringID(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(13,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
Message_StringID(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(15,RANGED_TOO_CLOSE);//Client enforces range and sends the message, this is a backup just incase.
Message_StringID(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(MT_PetResponse, PET_TAUNTING);
this->GetOwner()->Message_StringID(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(MT_SpellFailure, FAILED_TAUNT);
Message_StringID(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(MT_SpellFailure, FAILED_TAUNT);
Message_StringID(Chat::SpellFailure, FAILED_TAUNT);
}
} else {
Message_StringID(MT_SpellFailure, FAILED_TAUNT);
Message_StringID(Chat::SpellFailure, FAILED_TAUNT);
}
if (HasSkillProcs())
@@ -2003,10 +2003,10 @@ void Mob::InstillDoubt(Mob *who) {
SpellOnTarget(229, who, false, true, -2000);
//is there a success message?
} else {
Message_StringID(4,NOT_SCARING);
Message_StringID(Chat::LightBlue,NOT_SCARING);
//Idea from WR:
/* if (target->IsNPC() && zone->random.Int(0,99) < 10 ) {
entity_list.MessageClose(target, false, 50, MT_NPCRampage, "%s lashes out in anger!",target->GetName());
entity_list.MessageClose(target, false, 50, Chat::NPCRampage, "%s lashes out in anger!",target->GetName());
//should we actually do this? and the range is completely made up, unconfirmed
entity_list.AEAttack(target, 50);
}*/
@@ -2033,7 +2033,7 @@ 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, MT_CritMelee, FATAL_BOW_SHOT,
entity_list.MessageClose_StringID(this, false, 200, Chat::MeleeCrit, FATAL_BOW_SHOT,
GetName());
return HeadShot_Dmg;
}
@@ -2078,7 +2078,7 @@ 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, MT_CritMelee, ASSASSINATES,
entity_list.MessageClose_StringID(this, false, 200, Chat::MeleeCrit, ASSASSINATES,
GetName());
return Assassinate_Dmg;
}