mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[DoT Messages] Add DoT messages for mob->PC casts, fixed others to use correct str. (#2289)
This commit is contained in:
parent
3b409def2c
commit
6b5e4afd2d
@ -4121,19 +4121,29 @@ void Mob::CommonDamage(Mob* attacker, int64 &damage, const uint16 spell_id, cons
|
||||
else {
|
||||
//else, it is a buff tic...
|
||||
// So we can see our dot dmg like live shows it.
|
||||
if (spell_id != SPELL_UNKNOWN && damage > 0 && attacker && attacker != this && attacker->IsClient()) {
|
||||
if (spell_id != SPELL_UNKNOWN && damage > 0 && attacker && attacker != this && !attacker->IsCorpse()) {
|
||||
//might filter on (attack_skill>200 && attack_skill<250), but I dont think we need it
|
||||
attacker->FilteredMessageString(attacker, Chat::DotDamage, FilterDOT,
|
||||
YOUR_HIT_DOT, GetCleanName(), itoa(damage), spells[spell_id].name);
|
||||
if (attacker->IsClient()) {
|
||||
attacker->FilteredMessageString(attacker, Chat::DotDamage,
|
||||
FilterDOT, YOUR_HIT_DOT, GetCleanName(), itoa(damage),
|
||||
spells[spell_id].name);
|
||||
}
|
||||
|
||||
if (IsClient()) {
|
||||
FilteredMessageString(this, Chat::DotDamage, FilterDOT,
|
||||
YOU_TAKE_DOT, itoa(damage), attacker->GetCleanName(),
|
||||
spells[spell_id].name);
|
||||
}
|
||||
|
||||
/* older clients don't have the below String ID, but it will be filtered */
|
||||
entity_list.FilteredMessageCloseString(
|
||||
attacker, /* Sender */
|
||||
this, /* Sender */
|
||||
true, /* Skip Sender */
|
||||
RuleI(Range, SpellMessages),
|
||||
Chat::DotDamage, /* Type: 325 */
|
||||
FilterDOT, /* FilterType: 19 */
|
||||
OTHER_HIT_DOT, /* MessageFormat: %1 has taken %2 damage from %3 by %4. */
|
||||
attacker, /* sent above */
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(damage), /* Message2 */
|
||||
attacker->GetCleanName(), /* Message3 */
|
||||
@ -4677,6 +4687,7 @@ void Mob::TryPetCriticalHit(Mob *defender, DamageHitInfo &hit)
|
||||
Chat::MeleeCrit, /* Type: 301 */
|
||||
FilterMeleeCrits, /* FilterType: 12 */
|
||||
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
|
||||
0,
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
@ -4737,6 +4748,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
Chat::MeleeCrit, /* Type: 301 */
|
||||
FilterMeleeCrits, /* FilterType: 12 */
|
||||
FEMALE_SLAYUNDEAD, /* MessageFormat: %1's holy blade cleanses her target!(%2) */
|
||||
0,
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
@ -4750,6 +4762,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
Chat::MeleeCrit, /* Type: 301 */
|
||||
FilterMeleeCrits, /* FilterType: 12 */
|
||||
MALE_SLAYUNDEAD, /* MessageFormat: %1's holy blade cleanses his target!(%2) */
|
||||
0,
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
@ -4832,6 +4845,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
Chat::MeleeCrit, /* Type: 301 */
|
||||
FilterMeleeCrits, /* FilterType: 12 */
|
||||
DEADLY_STRIKE, /* MessageFormat: %1 scores a Deadly Strike!(%2) */
|
||||
0,
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
@ -4860,6 +4874,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
Chat::MeleeCrit, /* Type: 301 */
|
||||
FilterMeleeCrits, /* FilterType: 12 */
|
||||
CRIPPLING_BLOW, /* MessageFormat: %1 lands a Crippling Blow!(%2) */
|
||||
0,
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
@ -4882,6 +4897,7 @@ void Mob::TryCriticalHit(Mob *defender, DamageHitInfo &hit, ExtraAttackOptions *
|
||||
Chat::MeleeCrit, /* Type: 301 */
|
||||
FilterMeleeCrits, /* FilterType: 12 */
|
||||
CRITICAL_HIT, /* MessageFormat: %1 scores a critical hit! (%2) */
|
||||
0,
|
||||
GetCleanName(), /* Message1 */
|
||||
itoa(hit.damage_done + hit.min_damage) /* Message2 */
|
||||
);
|
||||
@ -4931,6 +4947,7 @@ bool Mob::TryFinishingBlow(Mob *defender, int64 &damage)
|
||||
Chat::MeleeCrit, /* Type: 301 */
|
||||
FilterMeleeCrits, /* FilterType: 12 */
|
||||
FINISHING_BLOW, /* MessageFormat: %1 scores a Finishing Blow!!) */
|
||||
0,
|
||||
GetCleanName() /* Message1 */
|
||||
);
|
||||
|
||||
|
||||
@ -2374,6 +2374,7 @@ void EntityList::FilteredMessageCloseString(
|
||||
uint32 type,
|
||||
eqFilterType filter,
|
||||
uint32 string_id,
|
||||
Mob *skip,
|
||||
const char *message1,
|
||||
const char *message2,
|
||||
const char *message3,
|
||||
@ -2390,7 +2391,7 @@ void EntityList::FilteredMessageCloseString(
|
||||
|
||||
for (auto & it : client_list) {
|
||||
c = it.second;
|
||||
if (c && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender)) {
|
||||
if (c && c != skip && DistanceSquared(c->GetPosition(), sender->GetPosition()) <= dist2 && (!skipsender || c != sender)) {
|
||||
c->FilteredMessageString(
|
||||
sender, type, filter, string_id,
|
||||
message1, message2, message3, message4, message5,
|
||||
|
||||
@ -362,6 +362,7 @@ public:
|
||||
uint32 type,
|
||||
eqFilterType filter,
|
||||
uint32 string_id,
|
||||
Mob *skip = 0,
|
||||
const char *message1 = 0,
|
||||
const char *message2 = 0,
|
||||
const char *message3 = 0,
|
||||
|
||||
@ -333,6 +333,7 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, CastingSlot slot,
|
||||
Chat::SpellFailure,
|
||||
(IsClient() ? FilterPCSpells : FilterNPCSpells),
|
||||
(fizzle_msg == MISS_NOTE ? MISSED_NOTE_OTHER : SPELL_FIZZLE_OTHER),
|
||||
0,
|
||||
/*
|
||||
MessageFormat: You miss a note, bringing your song to a close! (if missed note)
|
||||
MessageFormat: A missed note brings %1's song to a close!
|
||||
|
||||
@ -520,6 +520,7 @@
|
||||
#define REPORT_ONCE 12945 //You may only submit a report once per time that you zone. Thank you.
|
||||
#define NOW_INVISIBLE 12950 //%1 is now Invisible.
|
||||
#define NOW_VISIBLE 12951 //%1 is now Visible.
|
||||
#define YOU_TAKE_DOT 12954 //You have taken %1 damage from %2 by %3
|
||||
#define GUILD_NOT_MEMBER2 12966 //You are not in a guild.
|
||||
#define HOT_HEAL_SELF 12976 //You have been healed for %1 hit points by your %2.
|
||||
#define HOT_HEAL_OTHER 12997 //You have healed %1 for %2 hit points with your %3.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user