Log in

View Full Version : non-melee damage messages


demonstar55
06-10-2012, 11:52 PM
So I remember from playing on live that I was never able to parse spell damage, but when I started playing on live it worked fine, and I was able to see other people's spell damage. This was just the case of using the wrong StringID and not sending to to the entity_list. I can verify that on live it will send it to everyone, including people out of your group, so this behavior is correct. The range might be too large, but I am not sure what it is, I just used the same range that critical blast messages use.

Index: EQEmuServer/zone/attack.cpp
================================================== =================
--- EQEmuServer/zone/attack.cpp (revision 2145)
+++ EQEmuServer/zone/attack.cpp (working copy)
@@ -3534,7 +3534,7 @@
if (((spell_id != SPELL_UNKNOWN)||(FromDamageShield)) && damage>0) {
//special crap for spell damage, looks hackish to me
char val1[20]={0};
- attacker->Message_StringID(MT_NonMelee,OTHER_HIT_NONMELEE,Ge tCleanName(),ConvertArray(damage,val1));
+ entity_list.MessageClose_StringID(this, false, 100, MT_NonMelee, HIT_NON_MELEE, attacker->GetCleanName(), GetCleanName(),ConvertArray(damage,val1));
} else {
if(damage > 0) {
if(spell_id != SPELL_UNKNOWN)

demonstar55
06-22-2012, 09:20 PM
Apparently I missed some things or didn't test that change enough

Index: attack.cpp
================================================== =================
--- attack.cpp (revision 2146)
+++ attack.cpp (working copy)
@@ -3392,7 +3392,7 @@

if(attacker && attacker->IsClient() && (spell_id != SPELL_UNKNOWN) && damage>0) {
char val1[20]={0};
- attacker->Message_StringID(4,OTHER_HIT_NONMELEE,GetCleanName (),ConvertArray(damage,val1));
+ entity_list.MessageClose_StringID(this, false, 100, MT_NonMelee, HIT_NON_MELEE, attacker->GetCleanName(), GetCleanName(),ConvertArray(damage,val1));
}

Death(attacker, damage, spell_id, skill_used);
@@ -3534,7 +3534,10 @@
if (((spell_id != SPELL_UNKNOWN)||(FromDamageShield)) && damage>0) {
//special crap for spell damage, looks hackish to me
char val1[20]={0};
- attacker->Message_StringID(MT_NonMelee,OTHER_HIT_NONMELEE,Ge tCleanName(),ConvertArray(damage,val1));
+ if (FromDamageShield)
+ attacker->Message_StringID(MT_NonMelee,OTHER_HIT_NONMELEE,Ge tCleanName(),ConvertArray(damage,val1));
+ else
+ entity_list.MessageClose_StringID(this, false, 100, MT_NonMelee,HIT_NON_MELEE,attacker->GetCleanName(),GetCleanName(),ConvertArray(damage, val1));
} else {
if(damage > 0) {
if(spell_id != SPELL_UNKNOWN)

Secrets
06-22-2012, 11:12 PM
Apparently I missed some things or didn't test that change enough

Index: attack.cpp
================================================== =================
--- attack.cpp (revision 2146)
+++ attack.cpp (working copy)
@@ -3392,7 +3392,7 @@

if(attacker && attacker->IsClient() && (spell_id != SPELL_UNKNOWN) && damage>0) {
char val1[20]={0};
- attacker->Message_StringID(4,OTHER_HIT_NONMELEE,GetCleanName (),ConvertArray(damage,val1));
+ entity_list.MessageClose_StringID(this, false, 100, MT_NonMelee, HIT_NON_MELEE, attacker->GetCleanName(), GetCleanName(),ConvertArray(damage,val1));
}

Death(attacker, damage, spell_id, skill_used);
@@ -3534,7 +3534,10 @@
if (((spell_id != SPELL_UNKNOWN)||(FromDamageShield)) && damage>0) {
//special crap for spell damage, looks hackish to me
char val1[20]={0};
- attacker->Message_StringID(MT_NonMelee,OTHER_HIT_NONMELEE,Ge tCleanName(),ConvertArray(damage,val1));
+ if (FromDamageShield)
+ attacker->Message_StringID(MT_NonMelee,OTHER_HIT_NONMELEE,Ge tCleanName(),ConvertArray(damage,val1));
+ else
+ entity_list.MessageClose_StringID(this, false, 100, MT_NonMelee,HIT_NON_MELEE,attacker->GetCleanName(),GetCleanName(),ConvertArray(damage, val1));
} else {
if(damage > 0) {
if(spell_id != SPELL_UNKNOWN)



Committed along with another change to DS Filters, r2147.

demonstar55
06-22-2012, 11:45 PM
Thanks! I also noticed that what live reports for DOTs is different (and UF at least). The Titanium client doesn't have the StringID is 13327 //%1 has taken %2 damage from %3 by %4.
(which is mob, damage, caster, spell)

Not too sure how to proceed since it wouldn't work for Titanium