From 3066341740896269766206db690f76a3785290b1 Mon Sep 17 00:00:00 2001 From: Coruja Date: Wed, 29 Jun 2016 19:41:34 -0300 Subject: [PATCH] Fixed: Attack/Kill command on pets allowing select the pet itself as target, making it attack his owner --- docs/REVISIONS-56-SERIES.TXT | 14 +++++++++++++- src/graysvr/CCharNPCPet.cpp | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/REVISIONS-56-SERIES.TXT b/docs/REVISIONS-56-SERIES.TXT index 6b8873fd8..a52de2407 100644 --- a/docs/REVISIONS-56-SERIES.TXT +++ b/docs/REVISIONS-56-SERIES.TXT @@ -97,4 +97,16 @@ Added: Support for colored multis on target functions (only compatible with HS c Fixed: Function f_onchar_delete not being called if the player char get deleted in any other way different from client Character Selecion menu. Fixed: Multi dynamic regions getting replaced by script static regions on server resync. Fixed: EF_FastWalkPrevention not working correctly. -Fixed: Popup menu on players returning parsing error when send Party clilocs to unsupported clients < 6.0.0.0 \ No newline at end of file +Fixed: Popup menu on players returning parsing error when send Party clilocs to unsupported clients < 6.0.0.0 + +28-06-2016, Coruja +[sphere_item_unsorted.scp]: Fixed wrong TYPE / TDATA2 on i_fountain_life, i_chest_combination. +[sphere_item_deco_carvings_statues.scp]: Fixed wrong TYPE / TDATA2 on i_statue_stone_blessed. +[sphere_item_deco_furniture.scp]: Fixed wrong TDATA2 on i_chest_kings_collection. +[sphere_serv_triggers.scp]: Updated 'f_onchar_delete' comments. +[sphere_defs.scp]: Updated 'mount_items' and 'mem_flags' values. +[sphere_skills.scp]: Reordered properties to follow the same default order on all skills (nothing was changed, just reordered). +[speakhuman.scp]: Fixed 'train' command returning console error when used on guards NPCs. + +29-06-2016, Coruja +Fixed: Attack/Kill command on pets allowing select the pet itself as target, making it attack his owner. \ No newline at end of file diff --git a/src/graysvr/CCharNPCPet.cpp b/src/graysvr/CCharNPCPet.cpp index 7b52886e5..a39dfdbeb 100644 --- a/src/graysvr/CCharNPCPet.cpp +++ b/src/graysvr/CCharNPCPet.cpp @@ -397,7 +397,7 @@ bool CChar::NPC_OnHearPetCmdTarg( int iCmd, CChar *pSrc, CObjBase *pObj, const C case PC_ATTACK: case PC_KILL: { - if ( !pCharTarg || pCharTarg == pSrc ) + if ( !pCharTarg || pCharTarg == this || pCharTarg == pSrc ) break; bSuccess = pCharTarg->OnAttackedBy(pSrc, 1, true); // we know who told them to do this. if ( bSuccess )