From dcdf9d6c2a7ffdc3b2561cc123647b9cd44d5bf0 Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Sat, 14 Mar 2020 09:19:02 -0700 Subject: [PATCH 1/9] Identify a master party. Leave parties that aren't the master to prevent multiple parties forming when joining games. --- BH/Modules/Party/Party.cpp | 52 +++++++++++++++++++++++++++++++++++--- BH/Modules/Party/Party.h | 7 +++-- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/BH/Modules/Party/Party.cpp b/BH/Modules/Party/Party.cpp index 17e7a2e8..c2d1b1ab 100644 --- a/BH/Modules/Party/Party.cpp +++ b/BH/Modules/Party/Party.cpp @@ -20,6 +20,11 @@ void Party::OnLoad() { LootHook->SetActive(0); } +void Party::OnGameJoin() { + min_party_id = 0xFFFF; + min_party_id_valid = false; +} + void Party::OnUnload() { } @@ -53,6 +58,8 @@ void Party::CheckParty() { RosterUnit* MyRoster = FindPlayerRoster(Me->dwUnitId); BnetData* pData = (*p_D2LAUNCH_BnData); + bool local_min_party_id_valid = true; + bool master_party_exists = false; for(RosterUnit* Party = (*p_D2CLIENT_PlayerUnitList);Party;Party = Party->pNext) { if(!_stricmp(Party->szName, MyRoster->szName)) continue; @@ -79,22 +86,61 @@ void Party::CheckParty() { } } } + if (!min_party_id_valid) { + if (Party->wPartyId != INVALID_PARTY_ID) { + min_party_id = min(Party->wPartyId, min_party_id); // track the minimum party id + } else { + local_min_party_id_valid = false; // if any are invalid, don't try to fix anything yet + } + } + else { // if (Party->wPartyId != INVALID_PARTY_ID && Party->wPartyId < min_party_id) { + // the original party must have disbanded + if (Party->wPartyId == min_party_id) master_party_exists = true; + } if ((Party->wPartyId == INVALID_PARTY_ID || Party->wPartyId != MyRoster->wPartyId) && Toggles["Enabled"].state) { + PrintText(1, "Party->wPartyID=%hu, MyRoster->wPartyId=%hu, min_party_id=%hu, min_party_id_valid=%hu", + Party->wPartyId, MyRoster->wPartyId, min_party_id, (WORD)(min_party_id_valid)); if(Party->dwPartyFlags & PARTY_INVITED_YOU) { - D2CLIENT_ClickParty(Party, 2); + if (min_party_id_valid) { + if (Party->wPartyId == min_party_id) { + PrintText(1, "Found the right party"); + D2CLIENT_ClickParty(Party, 2); + } + } else { + PrintText(1, "PARTY_INVITED_YOU, clicking party"); + D2CLIENT_ClickParty(Party, 2); + } c++; return; } if(Party->wPartyId == INVALID_PARTY_ID) { - if(Party->dwPartyFlags & PARTY_INVITED_BY_YOU) + PrintText(1, "INVALID_PARTY_ID"); + if(Party->dwPartyFlags & PARTY_INVITED_BY_YOU) { + PrintText(1, "PARTY_INVITED_BY_YOU"); continue; + } + PrintText(1, "Clicking Party"); D2CLIENT_ClickParty(Party, 2); c++; return; } } } - + if (min_party_id_valid && !master_party_exists) { + PrintText(1, "Master party disbanded. Resetting min_party_id."); + min_party_id_valid = false; + min_party_id = 0xFFFF; + c++; + return; + } + min_party_id_valid = local_min_party_id_valid; + if (Toggles["Enabled"].state && min_party_id_valid && MyRoster->wPartyId != min_party_id) { + PrintText(1, "Not in the right party!"); + PrintText(1, "min_party_id=%hu, MyRoster->wPartyId=%hu", min_party_id, MyRoster->wPartyId); + D2CLIENT_LeaveParty(); + c++; + return; + } if (valid) { for (auto it = LootingPermission.cbegin(); it != LootingPermission.cend(); ) { if (CurrentParty.find((*it).first) == CurrentParty.end()) { diff --git a/BH/Modules/Party/Party.h b/BH/Modules/Party/Party.h index 8c1aea4d..672ddd78 100644 --- a/BH/Modules/Party/Party.h +++ b/BH/Modules/Party/Party.h @@ -14,11 +14,14 @@ class Party : public Module { map LootingPermission; void CheckParty(); int c; + WORD min_party_id; + bool min_party_id_valid; public: - Party() : Module("Party") {}; + Party() : Module("Party"), min_party_id(0xFFFF), min_party_id_valid(false) {}; void OnLoad(); void OnUnload(); void OnLoop(); void OnKey(bool up, BYTE key, LPARAM lParam, bool* block); void OnGameExit(); -}; \ No newline at end of file + void OnGameJoin(); +}; From c88627a6dc32b29cd61d54adedd0fc4931445afc Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Sat, 14 Mar 2020 10:42:02 -0700 Subject: [PATCH 2/9] updated version to 1.9.8alpha --- BH/Constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BH/Constants.h b/BH/Constants.h index 1a9cbe87..43713187 100644 --- a/BH/Constants.h +++ b/BH/Constants.h @@ -1,6 +1,6 @@ #pragma once -#define BH_VERSION "BH 1.9.7" +#define BH_VERSION "BH 1.9.8alpha" #define CODE_PAGE 1252 // windows-1252 ANSI Latin 1; Western European (Windows) From 6850391e208e7592281bb93f46b7088b18e66a5b Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Sat, 14 Mar 2020 11:14:06 -0700 Subject: [PATCH 3/9] disabled print that fired if in game by yourself. updated to 1.9.8alpha2. --- BH/Constants.h | 2 +- BH/Modules/Party/Party.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BH/Constants.h b/BH/Constants.h index 43713187..605b99df 100644 --- a/BH/Constants.h +++ b/BH/Constants.h @@ -1,6 +1,6 @@ #pragma once -#define BH_VERSION "BH 1.9.8alpha" +#define BH_VERSION "BH 1.9.8alpha2" #define CODE_PAGE 1252 // windows-1252 ANSI Latin 1; Western European (Windows) diff --git a/BH/Modules/Party/Party.cpp b/BH/Modules/Party/Party.cpp index c2d1b1ab..9e2fd080 100644 --- a/BH/Modules/Party/Party.cpp +++ b/BH/Modules/Party/Party.cpp @@ -127,7 +127,7 @@ void Party::CheckParty() { } } if (min_party_id_valid && !master_party_exists) { - PrintText(1, "Master party disbanded. Resetting min_party_id."); + //PrintText(1, "Master party disbanded. Resetting min_party_id."); min_party_id_valid = false; min_party_id = 0xFFFF; c++; From ffa62c78168b8b010923d891aeceed040bee5f23 Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Sat, 14 Mar 2020 11:54:07 -0700 Subject: [PATCH 4/9] disabled all party related debug prints --- BH/Constants.h | 2 +- BH/Modules/Party/Party.cpp | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/BH/Constants.h b/BH/Constants.h index 605b99df..4c175fb0 100644 --- a/BH/Constants.h +++ b/BH/Constants.h @@ -1,6 +1,6 @@ #pragma once -#define BH_VERSION "BH 1.9.8alpha2" +#define BH_VERSION "BH 1.9.8alpha3" #define CODE_PAGE 1252 // windows-1252 ANSI Latin 1; Western European (Windows) diff --git a/BH/Modules/Party/Party.cpp b/BH/Modules/Party/Party.cpp index 9e2fd080..96aadb96 100644 --- a/BH/Modules/Party/Party.cpp +++ b/BH/Modules/Party/Party.cpp @@ -98,28 +98,28 @@ void Party::CheckParty() { if (Party->wPartyId == min_party_id) master_party_exists = true; } if ((Party->wPartyId == INVALID_PARTY_ID || Party->wPartyId != MyRoster->wPartyId) && Toggles["Enabled"].state) { - PrintText(1, "Party->wPartyID=%hu, MyRoster->wPartyId=%hu, min_party_id=%hu, min_party_id_valid=%hu", - Party->wPartyId, MyRoster->wPartyId, min_party_id, (WORD)(min_party_id_valid)); + //PrintText(1, "Party->wPartyID=%hu, MyRoster->wPartyId=%hu, min_party_id=%hu, min_party_id_valid=%hu", + //Party->wPartyId, MyRoster->wPartyId, min_party_id, (WORD)(min_party_id_valid)); if(Party->dwPartyFlags & PARTY_INVITED_YOU) { if (min_party_id_valid) { if (Party->wPartyId == min_party_id) { - PrintText(1, "Found the right party"); + //PrintText(1, "Found the right party"); D2CLIENT_ClickParty(Party, 2); } } else { - PrintText(1, "PARTY_INVITED_YOU, clicking party"); + //PrintText(1, "PARTY_INVITED_YOU, clicking party"); D2CLIENT_ClickParty(Party, 2); } c++; return; } if(Party->wPartyId == INVALID_PARTY_ID) { - PrintText(1, "INVALID_PARTY_ID"); + //PrintText(1, "INVALID_PARTY_ID"); if(Party->dwPartyFlags & PARTY_INVITED_BY_YOU) { - PrintText(1, "PARTY_INVITED_BY_YOU"); + //PrintText(1, "PARTY_INVITED_BY_YOU"); continue; } - PrintText(1, "Clicking Party"); + //PrintText(1, "Clicking Party"); D2CLIENT_ClickParty(Party, 2); c++; return; @@ -135,8 +135,8 @@ void Party::CheckParty() { } min_party_id_valid = local_min_party_id_valid; if (Toggles["Enabled"].state && min_party_id_valid && MyRoster->wPartyId != min_party_id) { - PrintText(1, "Not in the right party!"); - PrintText(1, "min_party_id=%hu, MyRoster->wPartyId=%hu", min_party_id, MyRoster->wPartyId); + //PrintText(1, "Not in the right party!"); + //PrintText(1, "min_party_id=%hu, MyRoster->wPartyId=%hu", min_party_id, MyRoster->wPartyId); D2CLIENT_LeaveParty(); c++; return; From 5f4a167a575430e749f4ef04514c121638bee09f Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Sun, 15 Mar 2020 10:29:10 -0700 Subject: [PATCH 5/9] delete the rules and conditions in UnitializeItemRules(). Previously there was a memory leak. --- BH/Modules/Item/ItemDisplay.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/BH/Modules/Item/ItemDisplay.cpp b/BH/Modules/Item/ItemDisplay.cpp index 3c9991b5..5087134d 100644 --- a/BH/Modules/Item/ItemDisplay.cpp +++ b/BH/Modules/Item/ItemDisplay.cpp @@ -366,6 +366,16 @@ namespace ItemDisplay { } void UninitializeItemRules() { + // RuleList contains every created rule. MapRuleList and IgnoreRuleList have a subset of rules. + // Deleting objects in RuleList is sufficient. + if (item_display_initialized) { + for (Rule *r : RuleList) { + for (Condition *condition : r->conditions) { + delete condition; + } + delete r; + } + } item_display_initialized = false; RuleList.clear(); MapRuleList.clear(); From faab9b46b33192495e54b5126f23869294dc70da Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Sun, 15 Mar 2020 10:38:13 -0700 Subject: [PATCH 6/9] 1.9.8alpha4 --- BH/Constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BH/Constants.h b/BH/Constants.h index 4c175fb0..99199f72 100644 --- a/BH/Constants.h +++ b/BH/Constants.h @@ -1,6 +1,6 @@ #pragma once -#define BH_VERSION "BH 1.9.8alpha3" +#define BH_VERSION "BH 1.9.8alpha4" #define CODE_PAGE 1252 // windows-1252 ANSI Latin 1; Western European (Windows) From 88a2c5cb37918e1eaca565d1569791bb55231359 Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Mon, 16 Mar 2020 06:55:17 -0700 Subject: [PATCH 7/9] think i got most of the bugs worked out with autoparty now. --- BH/Modules/Party/Party.cpp | 111 +++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 49 deletions(-) diff --git a/BH/Modules/Party/Party.cpp b/BH/Modules/Party/Party.cpp index 96aadb96..ac7f46a2 100644 --- a/BH/Modules/Party/Party.cpp +++ b/BH/Modules/Party/Party.cpp @@ -52,18 +52,23 @@ void Party::OnLoop() { void Party::CheckParty() { if(c == 0) { - bool valid = true; std::map CurrentParty; UnitAny* Me = *p_D2CLIENT_PlayerUnit; RosterUnit* MyRoster = FindPlayerRoster(Me->dwUnitId); BnetData* pData = (*p_D2LAUNCH_BnData); - bool local_min_party_id_valid = true; - bool master_party_exists = false; - for(RosterUnit* Party = (*p_D2CLIENT_PlayerUnitList);Party;Party = Party->pNext) { + //bool local_min_party_id_valid = true; + //bool master_party_exists = false; + + WORD current_min_party_id = 0xFFFF; + + // first pass: check that the data is sane + RosterUnit *Party = *p_D2CLIENT_PlayerUnitList; if (!Party) return; + do { if(!_stricmp(Party->szName, MyRoster->szName)) continue; - if(!Party->wLevel || !Party) { + if(!Party->wLevel) { + PrintText(1, "!Party->wLevel"); c++; return; } @@ -71,9 +76,23 @@ void Party::CheckParty() { (Party->wPartyId != INVALID_PARTY_ID && Party->dwPartyFlags & PARTY_NOT_IN_PARTY)) { // Avoid crashing when multiple players in a game have auto-party enabled // (there seems to be a brief window in which the party data can be invalid) - valid = false; - continue; + c++; return; } + } while (Party = Party->pNext); + + // second pass: gather some info + Party = *p_D2CLIENT_PlayerUnitList; if (!Party) return; + do { + if(!_stricmp(Party->szName, MyRoster->szName)) + continue; + current_min_party_id = min(Party->wPartyId, current_min_party_id); + } while (Party=Party->pNext); + + // third pass: do stuff + Party = *p_D2CLIENT_PlayerUnitList; if (!Party) return; + do { + if(!_stricmp(Party->szName, MyRoster->szName)) + continue; if (pData && pData->nCharFlags & PLAYER_TYPE_HARDCORE) { CurrentParty[Party->szName] = true; if (Toggles["LootEnabled"].state) { @@ -86,32 +105,23 @@ void Party::CheckParty() { } } } - if (!min_party_id_valid) { - if (Party->wPartyId != INVALID_PARTY_ID) { - min_party_id = min(Party->wPartyId, min_party_id); // track the minimum party id - } else { - local_min_party_id_valid = false; // if any are invalid, don't try to fix anything yet - } - } - else { // if (Party->wPartyId != INVALID_PARTY_ID && Party->wPartyId < min_party_id) { - // the original party must have disbanded - if (Party->wPartyId == min_party_id) master_party_exists = true; - } if ((Party->wPartyId == INVALID_PARTY_ID || Party->wPartyId != MyRoster->wPartyId) && Toggles["Enabled"].state) { - //PrintText(1, "Party->wPartyID=%hu, MyRoster->wPartyId=%hu, min_party_id=%hu, min_party_id_valid=%hu", - //Party->wPartyId, MyRoster->wPartyId, min_party_id, (WORD)(min_party_id_valid)); + //PrintText(1, "Party->wPartyID=%hu, MyRoster->wPartyId=%hu, min_party_id=%hu", + // Party->wPartyId, MyRoster->wPartyId, current_min_party_id); if(Party->dwPartyFlags & PARTY_INVITED_YOU) { - if (min_party_id_valid) { - if (Party->wPartyId == min_party_id) { - //PrintText(1, "Found the right party"); + if (current_min_party_id != INVALID_PARTY_ID) { + if (Party->wPartyId == current_min_party_id) { + PrintText(1, "Found the right party"); D2CLIENT_ClickParty(Party, 2); + c++; + return; } } else { - //PrintText(1, "PARTY_INVITED_YOU, clicking party"); + PrintText(1, "PARTY_INVITED_YOU, clicking party"); D2CLIENT_ClickParty(Party, 2); + c++; + return; } - c++; - return; } if(Party->wPartyId == INVALID_PARTY_ID) { //PrintText(1, "INVALID_PARTY_ID"); @@ -119,35 +129,38 @@ void Party::CheckParty() { //PrintText(1, "PARTY_INVITED_BY_YOU"); continue; } - //PrintText(1, "Clicking Party"); - D2CLIENT_ClickParty(Party, 2); - c++; - return; + if (current_min_party_id != INVALID_PARTY_ID) { + if (MyRoster->wPartyId == current_min_party_id) { + PrintText(1, "I'm in the right party, inviting another."); + D2CLIENT_ClickParty(Party, 2); + c++; + return; + } + } else { + PrintText(1, "There's no master party, trying to form one."); + D2CLIENT_ClickParty(Party, 2); + c++; + return; + } } } - } - if (min_party_id_valid && !master_party_exists) { - //PrintText(1, "Master party disbanded. Resetting min_party_id."); - min_party_id_valid = false; - min_party_id = 0xFFFF; - c++; - return; - } - min_party_id_valid = local_min_party_id_valid; - if (Toggles["Enabled"].state && min_party_id_valid && MyRoster->wPartyId != min_party_id) { - //PrintText(1, "Not in the right party!"); - //PrintText(1, "min_party_id=%hu, MyRoster->wPartyId=%hu", min_party_id, MyRoster->wPartyId); + + } while (Party = Party->pNext); + // Leave the party if we're in the wrong one + if (Toggles["Enabled"].state && current_min_party_id != INVALID_PARTY_ID + && MyRoster->wPartyId != current_min_party_id && MyRoster->wPartyId != INVALID_PARTY_ID) { + PrintText(1, "Not in the right party!"); + PrintText(1, "min_party_id=%hu, MyRoster->wPartyId=%hu", current_min_party_id, MyRoster->wPartyId); D2CLIENT_LeaveParty(); c++; return; } - if (valid) { - for (auto it = LootingPermission.cbegin(); it != LootingPermission.cend(); ) { - if (CurrentParty.find((*it).first) == CurrentParty.end()) { - LootingPermission.erase(it++); - } else { - ++it; - } + // Remove looting permissions for players no longer in the game?? + for (auto it = LootingPermission.cbegin(); it != LootingPermission.cend(); ) { + if (CurrentParty.find((*it).first) == CurrentParty.end()) { + LootingPermission.erase(it++); + } else { + ++it; } } } From d137bfeb54925fb446e986d463ca6a2294f3de51 Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Mon, 16 Mar 2020 07:57:53 -0700 Subject: [PATCH 8/9] remove unneeded member variables. --- BH/Modules/Party/Party.cpp | 7 ++----- BH/Modules/Party/Party.h | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/BH/Modules/Party/Party.cpp b/BH/Modules/Party/Party.cpp index ac7f46a2..0cda1758 100644 --- a/BH/Modules/Party/Party.cpp +++ b/BH/Modules/Party/Party.cpp @@ -21,8 +21,6 @@ void Party::OnLoad() { } void Party::OnGameJoin() { - min_party_id = 0xFFFF; - min_party_id_valid = false; } void Party::OnUnload() { @@ -57,9 +55,6 @@ void Party::CheckParty() { RosterUnit* MyRoster = FindPlayerRoster(Me->dwUnitId); BnetData* pData = (*p_D2LAUNCH_BnData); - //bool local_min_party_id_valid = true; - //bool master_party_exists = false; - WORD current_min_party_id = 0xFFFF; // first pass: check that the data is sane @@ -98,6 +93,7 @@ void Party::CheckParty() { if (Toggles["LootEnabled"].state) { string s(Party->szName); if (LootingPermission.find(s) == LootingPermission.end()) { + PrintText(1, "Enabling loot for %s.", s.c_str()); BYTE PacketData[7] = {0x5d,1,1,0,0,0,0}; *reinterpret_cast(PacketData + 3) = Party->dwUnitId; D2NET_SendPacket(7, 1, PacketData); @@ -158,6 +154,7 @@ void Party::CheckParty() { // Remove looting permissions for players no longer in the game?? for (auto it = LootingPermission.cbegin(); it != LootingPermission.cend(); ) { if (CurrentParty.find((*it).first) == CurrentParty.end()) { + PrintText(1, "Removing %s from looting map.", ((*it).first).c_str()); LootingPermission.erase(it++); } else { ++it; diff --git a/BH/Modules/Party/Party.h b/BH/Modules/Party/Party.h index 672ddd78..6c9571f6 100644 --- a/BH/Modules/Party/Party.h +++ b/BH/Modules/Party/Party.h @@ -14,10 +14,8 @@ class Party : public Module { map LootingPermission; void CheckParty(); int c; - WORD min_party_id; - bool min_party_id_valid; public: - Party() : Module("Party"), min_party_id(0xFFFF), min_party_id_valid(false) {}; + Party() : Module("Party") {}; void OnLoad(); void OnUnload(); void OnLoop(); From 31afe8bd22c4b0c1b9e78e029d164e3209268408 Mon Sep 17 00:00:00 2001 From: youbetterdont Date: Mon, 16 Mar 2020 08:11:55 -0700 Subject: [PATCH 9/9] disabled debug prints. 1.9.8alpha5. --- BH/Constants.h | 2 +- BH/Modules/Party/Party.cpp | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/BH/Constants.h b/BH/Constants.h index 99199f72..44b0cb00 100644 --- a/BH/Constants.h +++ b/BH/Constants.h @@ -1,6 +1,6 @@ #pragma once -#define BH_VERSION "BH 1.9.8alpha4" +#define BH_VERSION "BH 1.9.8alpha5" #define CODE_PAGE 1252 // windows-1252 ANSI Latin 1; Western European (Windows) diff --git a/BH/Modules/Party/Party.cpp b/BH/Modules/Party/Party.cpp index 0cda1758..03d3f121 100644 --- a/BH/Modules/Party/Party.cpp +++ b/BH/Modules/Party/Party.cpp @@ -63,7 +63,7 @@ void Party::CheckParty() { if(!_stricmp(Party->szName, MyRoster->szName)) continue; if(!Party->wLevel) { - PrintText(1, "!Party->wLevel"); + //PrintText(1, "!Party->wLevel"); c++; return; } @@ -93,7 +93,7 @@ void Party::CheckParty() { if (Toggles["LootEnabled"].state) { string s(Party->szName); if (LootingPermission.find(s) == LootingPermission.end()) { - PrintText(1, "Enabling loot for %s.", s.c_str()); + //PrintText(1, "Enabling loot for %s.", s.c_str()); BYTE PacketData[7] = {0x5d,1,1,0,0,0,0}; *reinterpret_cast(PacketData + 3) = Party->dwUnitId; D2NET_SendPacket(7, 1, PacketData); @@ -107,13 +107,13 @@ void Party::CheckParty() { if(Party->dwPartyFlags & PARTY_INVITED_YOU) { if (current_min_party_id != INVALID_PARTY_ID) { if (Party->wPartyId == current_min_party_id) { - PrintText(1, "Found the right party"); + //PrintText(1, "Found the right party"); D2CLIENT_ClickParty(Party, 2); c++; return; } } else { - PrintText(1, "PARTY_INVITED_YOU, clicking party"); + //PrintText(1, "PARTY_INVITED_YOU, clicking party"); D2CLIENT_ClickParty(Party, 2); c++; return; @@ -127,13 +127,13 @@ void Party::CheckParty() { } if (current_min_party_id != INVALID_PARTY_ID) { if (MyRoster->wPartyId == current_min_party_id) { - PrintText(1, "I'm in the right party, inviting another."); + //PrintText(1, "I'm in the right party, inviting another."); D2CLIENT_ClickParty(Party, 2); c++; return; } } else { - PrintText(1, "There's no master party, trying to form one."); + //PrintText(1, "There's no master party, trying to form one."); D2CLIENT_ClickParty(Party, 2); c++; return; @@ -145,16 +145,16 @@ void Party::CheckParty() { // Leave the party if we're in the wrong one if (Toggles["Enabled"].state && current_min_party_id != INVALID_PARTY_ID && MyRoster->wPartyId != current_min_party_id && MyRoster->wPartyId != INVALID_PARTY_ID) { - PrintText(1, "Not in the right party!"); - PrintText(1, "min_party_id=%hu, MyRoster->wPartyId=%hu", current_min_party_id, MyRoster->wPartyId); + //PrintText(1, "Not in the right party!"); + //PrintText(1, "min_party_id=%hu, MyRoster->wPartyId=%hu", current_min_party_id, MyRoster->wPartyId); D2CLIENT_LeaveParty(); c++; return; } - // Remove looting permissions for players no longer in the game?? + // Remove looting permissions for players no longer in the game for (auto it = LootingPermission.cbegin(); it != LootingPermission.cend(); ) { if (CurrentParty.find((*it).first) == CurrentParty.end()) { - PrintText(1, "Removing %s from looting map.", ((*it).first).c_str()); + //PrintText(1, "Removing %s from looting map.", ((*it).first).c_str()); LootingPermission.erase(it++); } else { ++it;