From 92358e6d2e04c6399a9368d2a2df0b81b5ec5e60 Mon Sep 17 00:00:00 2001 From: Raylde <50953519+Raylde@users.noreply.github.com> Date: Sun, 24 Sep 2023 00:33:31 +0200 Subject: [PATCH 1/3] revert change of naword to nword to fix foundation issue --- src/network/send.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/send.h b/src/network/send.h index 9628fdce3..8383aee4d 100644 --- a/src/network/send.h +++ b/src/network/send.h @@ -1790,7 +1790,7 @@ class PacketHouseDesign : public PacketSend private: struct StairData { - naword m_id; + nword m_id; byte m_x; byte m_y; byte m_z; From c15080845c0deba11d856e975577c87ff58429d9 Mon Sep 17 00:00:00 2001 From: Raylde <50953519+Raylde@users.noreply.github.com> Date: Sun, 19 Nov 2023 22:50:14 +0100 Subject: [PATCH 2/3] Snooping use Range prop for the distance --- src/game/chars/CCharNotoriety.cpp | 6 +++--- src/game/chars/CCharSkill.cpp | 4 +++- src/game/clients/CClientEvent.cpp | 5 ----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/game/chars/CCharNotoriety.cpp b/src/game/chars/CCharNotoriety.cpp index 7ae807d01..3075c104b 100644 --- a/src/game/chars/CCharNotoriety.cpp +++ b/src/game/chars/CCharNotoriety.cpp @@ -557,15 +557,15 @@ void CChar::Noto_Kill(CChar * pKill, int iTotalKillers) if ( !pKill ) return; - // What was their noto to me ? - NOTO_TYPE NotoThem = pKill->Noto_GetFlag( this, false ); - // Fight is over now that i have won. (if i was fighting at all ) // ie. Magery cast might not be a "fight" Fight_Clear(pKill); if ( pKill == this ) return; + // What was their noto to me ? + NOTO_TYPE NotoThem = pKill->Noto_GetFlag( this, false ); + if ( m_pNPC ) { if ( pKill->m_pNPC ) diff --git a/src/game/chars/CCharSkill.cpp b/src/game/chars/CCharSkill.cpp index 6a9c23849..3936a9171 100644 --- a/src/game/chars/CCharSkill.cpp +++ b/src/game/chars/CCharSkill.cpp @@ -3963,7 +3963,9 @@ int CChar::Skill_Snooping(SKTRIG_TYPE stage) if (!IsTakeCrime(pCont, &pCharMark) || pCharMark == nullptr) return 0; // Not a crime really. - if (GetTopDist3D(pCharMark) > 1) + CSkillDef *pSkillDef = g_Cfg.GetSkillDef(SKILL_SNOOPING); + int iMaxRange = pSkillDef->m_Range ? pSkillDef->m_Range : 1; + if (GetTopDist3D(pCharMark) > iMaxRange) { SysMessageDefault(DEFMSG_SNOOPING_REACH); return (-SKTRIG_QTY); diff --git a/src/game/clients/CClientEvent.cpp b/src/game/clients/CClientEvent.cpp index f410b4e79..3329ce696 100644 --- a/src/game/clients/CClientEvent.cpp +++ b/src/game/clients/CClientEvent.cpp @@ -411,7 +411,6 @@ void CClient::Event_Item_Drop( CUID uidItem, CPointMap pt, CUID uidOn, uchar gri } } - CObjBase *pOldCont = pItem->GetContainer(); if (( IsTrigUsed(TRIGGER_DROPON_ITEM) ) || ( IsTrigUsed(TRIGGER_ITEMDROPON_ITEM) )) { CScriptTriggerArgs Args( pObjOn ); @@ -422,9 +421,6 @@ void CClient::Event_Item_Drop( CUID uidItem, CPointMap pt, CUID uidOn, uchar gri } } - if ( pOldCont != pItem->GetContainer() ) - return; - CItem * pItemOn = dynamic_cast ( pObjOn ); if (( pItemOn ) && (( IsTrigUsed(TRIGGER_DROPON_SELF) ) || ( IsTrigUsed(TRIGGER_ITEMDROPON_SELF) ))) { @@ -547,7 +543,6 @@ void CClient::Event_Item_Drop( CUID uidItem, CPointMap pt, CUID uidOn, uchar gri } // do the dragging anim for everyone else to see. - if ( pObjOn != nullptr ) { // in pack or other CItemContainer. From 4aeb9011d5f6941dd07ceeaeeac15640dc827b5b Mon Sep 17 00:00:00 2001 From: Raylde <50953519+Raylde@users.noreply.github.com> Date: Sun, 19 Nov 2023 22:55:26 +0100 Subject: [PATCH 3/3] update changelog --- Changelog.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 2f830e38d..63b9a5bd4 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -3435,3 +3435,6 @@ Additionally, the problem of zig-zag issue following in the South direction has 18-11-2023, Nolok - Fixed: House customization sending wrong component data, breaking it. + +19-11-2023, Raylde +- Modified: Snooping use Range for the distance