Jump to content

Fix Group Exp/Yang/Drop Share on different Maps


Recommended Posts

  • Premium

Hey guys,

after i noticed some positive rule changes on the forum i will start to
release some of my stuff i already published on an other forum.

In the past I often had problems with the Exp/Yang/Drops of group members were also shared on different maps.
The simplest solution was to just put the maps further apart, however I took a closer look why this is and fixed it accordingly.

 

in char_battle.cpp

// below FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY());
// replace pkKiller->GetParty()->ForEachOnlineMember(f);

pkKiller->GetParty()->ForEachOnMapMember(f, pkKiller->GetMapIndex());

 

// below f.m_iStep = 1;
// replace pkKiller->GetParty()->ForEachOnlineMember(f);

pkKiller->GetParty()->ForEachOnMapMember(f, pkKiller->GetMapIndex());

 

// below NPartyExpDistribute::FPartyTotaler f(ch);
// replace pParty->ForEachOnlineMember(f);

pParty->ForEachOnMapMember(f, ch->GetMapIndex());

 

// below NPartyExpDistribute::FPartyDistributor fDist(ch, f.member_count, f.total, iExp, pParty->GetExpDistributionMode());
// replace pParty->ForEachOnlineMember(fDist);

pParty->ForEachOnMapMember(fDist, ch->GetMapIndex());

 

in char_item.cpp

// below NPartyPickupDistribute::FCountNearMember funcCountNearMember(this);
// replace pParty->ForEachOnlineMember(funcCountNearMember);

pParty->ForEachOnMapMember(funcCountNearMember, GetMapIndex());

 

// below NPartyPickupDistribute::FMoneyDistributor funcMoneyDist(this, dwShare);
// replace pParty->ForEachOnlineMember(funcMoneyDist);

pParty->ForEachOnMapMember(funcMoneyDist, GetMapIndex());

 

// below NPartyPickupDistribute::FFindOwnership funcFindOwnership(item);
// replace GetParty()->ForEachOnlineMember(funcFindOwnership);

GetParty()->ForEachOnMapMember(funcFindOwnership, GetMapIndex());

 

  • Metin2 Dev 2
  • Good 5
  • Love 5
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.