mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
[Bug Fix] Using %T in channel messages on fresh corpse yields mob, not corpse name. (#4168)
* [Bug Fix] Using %T in channel messages on fresh corpse yields mob/player name, not corpse name. * Undo changes to PC corpse. * Use rename to fix %T usage on client for those in zone * Fix indentation spacing * Update to consolidate Rename as suggested. * Fix for mobs with ` in name * Fix to use GetName() instead of GetCleanName()
This commit is contained in:
+9
-1
@@ -2500,8 +2500,9 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
d->spell_id = UINT32_MAX;
|
||||
d->attack_skill = SkillDamageTypes[attack_skill];
|
||||
d->damage = damage;
|
||||
d->corpseid = GetID();
|
||||
|
||||
app->priority = 6;
|
||||
app->priority = 1;
|
||||
|
||||
entity_list.QueueClients(killer_mob, app, false);
|
||||
|
||||
@@ -2833,8 +2834,15 @@ bool NPC::Death(Mob* killer_mob, int64 damage, uint16 spell, EQ::skills::SkillTy
|
||||
}
|
||||
|
||||
entity_list.LimitRemoveNPC(this);
|
||||
|
||||
entity_list.AddCorpse(corpse, GetID());
|
||||
|
||||
// The client sees NPC corpses as name's_corpse. The server uses
|
||||
// name`s_corpse so that %T works on corpses (client workaround)
|
||||
// Rename the new corpse on client side.
|
||||
std::string old_name = Strings::Replace(corpse->GetName(), "`s_corpse", "'s_corpse");
|
||||
SendRename(killer_mob, old_name.c_str(), corpse->GetName());
|
||||
|
||||
entity_list.UnMarkNPC(GetID());
|
||||
entity_list.RemoveNPC(GetID());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user