Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions src/game/chars/CCharNotoriety.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
4 changes: 3 additions & 1 deletion src/game/chars/CCharSkill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions src/game/clients/CClientEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand All @@ -422,9 +421,6 @@ void CClient::Event_Item_Drop( CUID uidItem, CPointMap pt, CUID uidOn, uchar gri
}
}

if ( pOldCont != pItem->GetContainer() )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember adding this for a reason, does git blame help for that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

@xwerswoodx xwerswoodx Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check should be there, because this check if the item changed the container while dropon_item trigger checking;

I mean think like 2 players tries to get same item from the corpse or ground, and you did some checks under dropon_item, for the first player, then added the item in his container, you don't want to second player take it away from player's backpack. This check is added to block this, but it probably could be really really rare issue, as sphere can handle these checks in milliseconds, but as someone can have tons of checks under @DropOn_Item, checking if the old container is same is a guarantee. So it has to stay as it was honestly.

return;

CItem * pItemOn = dynamic_cast <CItem*> ( pObjOn );
if (( pItemOn ) && (( IsTrigUsed(TRIGGER_DROPON_SELF) ) || ( IsTrigUsed(TRIGGER_ITEMDROPON_SELF) )))
{
Expand Down Expand Up @@ -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.
Expand Down