From 21fc487c335cdd0324093b0e3571e222dc5c60e1 Mon Sep 17 00:00:00 2001 From: Uleat Date: Tue, 12 Jan 2016 18:44:51 -0500 Subject: [PATCH 01/10] World tradeskill objects should now exhibit pre-RoF behavior to all clients --- changelog.txt | 3 +++ zone/client_packet.cpp | 12 ++++-------- zone/object.cpp | 32 +++++++++++++++++++------------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/changelog.txt b/changelog.txt index f8ca4c917..899bcc22c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 01/12/2016 == +Uleat: Fix for tradeskill containers remaining locked after a RoF+ client leaves. Intermediary fix for RoF+ clients accessing tradeskill containers when in use by another player. + == 12/29/2015 == Akkadius: Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true - When a zone boots, it will spawn an invisible npc by the name of zone_controller diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index f20ffb5f4..58381db62 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4253,15 +4253,11 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app) EQApplicationPacket end_trade2(OP_FinishWindow2, 0); QueuePacket(&end_trade2); - return; - // RoF sends a 0 sized packet for closing objects - /* - Object* object = GetTradeskillObject(); - if (object) { - object->CastToObject()->Close(); - } - */ + if (GetTradeskillObject() && GetClientVersion() >= ClientVersion::RoF) + GetTradeskillObject()->CastToObject()->Close(); + + return; } else { diff --git a/zone/object.cpp b/zone/object.cpp index 7255cd9e9..d06a311c0 100644 --- a/zone/object.cpp +++ b/zone/object.cpp @@ -533,20 +533,26 @@ bool Object::HandleClick(Client* sender, const ClickObject_Struct* click_object) ClickObjectAction_Struct* coa = (ClickObjectAction_Struct*)outapp->pBuffer; //TODO: there is prolly a better way to do this. - //if this is not the main user, send them a close and a message - if(user == nullptr || user == sender) - coa->open = 0x01; - else { - coa->open = 0x00; - //sender->Message(13, "Somebody is allready using that container."); - } - m_inuse = true; - coa->type = m_type; - coa->unknown16 = 0x0a; + m_inuse = true; + coa->type = m_type; + coa->unknown16 = 0x0a; - coa->drop_id = click_object->drop_id; - coa->player_id = click_object->player_id; - coa->icon = m_icon; + coa->drop_id = click_object->drop_id; + coa->player_id = click_object->player_id; + coa->icon = m_icon; + + //if this is not the main user, send them a close and a message + if (user == nullptr || user == sender) { + coa->open = 0x01; + } + else { + coa->open = 0x00; + + if (sender->GetClientVersion() >= ClientVersion::RoF) { + coa->drop_id = 0xFFFFFFFF; + sender->Message(0, "Someone else is using that. Try again later."); + } + } if(sender->IsLooting()) { From edeb7d79d174f9c625520ea949d3d896a10a9ce8 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Tue, 12 Jan 2016 19:08:10 -0800 Subject: [PATCH 02/10] Add Lua_Client::ClearCompassMark(). --- changelog.txt | 4 ++++ zone/lua_client.cpp | 6 ++++++ zone/lua_client.h | 1 + 3 files changed, 11 insertions(+) diff --git a/changelog.txt b/changelog.txt index 899bcc22c..2adec24ba 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 01/12/2016 == +Athrogate: Adding ClearCompassMark() to Lua. + - Lua didn't have ClearCompassMark(). Perl already had this. + == 01/12/2016 == Uleat: Fix for tradeskill containers remaining locked after a RoF+ client leaves. Intermediary fix for RoF+ clients accessing tradeskill containers when in use by another player. diff --git a/zone/lua_client.cpp b/zone/lua_client.cpp index 1e785ce9b..82167c85b 100644 --- a/zone/lua_client.cpp +++ b/zone/lua_client.cpp @@ -1067,6 +1067,11 @@ void Lua_Client::MarkSingleCompassLoc(float in_x, float in_y, float in_z, int co self->MarkSingleCompassLoc(in_x, in_y, in_z, count); } +void Lua_Client::ClearCompassMark() { + Lua_Safe_Call_Void(); + self->MarkSingleCompassLoc(0,0,0,0); +} + int Lua_Client::GetNextAvailableSpellBookSlot() { Lua_Safe_Call_Int(); return self->GetNextAvailableSpellBookSlot(); @@ -1548,6 +1553,7 @@ luabind::scope lua_register_client() { .def("GrantAlternateAdvancementAbility", (bool(Lua_Client::*)(int, int, bool))&Lua_Client::GrantAlternateAdvancementAbility) .def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float))&Lua_Client::MarkSingleCompassLoc) .def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float,int))&Lua_Client::MarkSingleCompassLoc) + .def("ClearCompassMark",(void(Lua_Client::*)(void))&Lua_Client::ClearCompassMark) .def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(void))&Lua_Client::GetNextAvailableSpellBookSlot) .def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(int))&Lua_Client::GetNextAvailableSpellBookSlot) .def("FindSpellBookSlotBySpellID", (int(Lua_Client::*)(int))&Lua_Client::FindSpellBookSlotBySpellID) diff --git a/zone/lua_client.h b/zone/lua_client.h index 4584edfd0..5353996c2 100644 --- a/zone/lua_client.h +++ b/zone/lua_client.h @@ -240,6 +240,7 @@ public: bool GrantAlternateAdvancementAbility(int aa_id, int points, bool ignore_cost); void MarkSingleCompassLoc(float in_x, float in_y, float in_z); void MarkSingleCompassLoc(float in_x, float in_y, float in_z, int count); + void ClearCompassMark(); int GetNextAvailableSpellBookSlot(); int GetNextAvailableSpellBookSlot(int start); int FindSpellBookSlotBySpellID(int spell_id); From 09b6adf7267efb3cdf25299e4e9f5797c636720f Mon Sep 17 00:00:00 2001 From: Athrogate Date: Tue, 12 Jan 2016 19:08:10 -0800 Subject: [PATCH 03/10] Add Lua_Client::ClearCompassMark(). --- zone/lua_client.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/lua_client.cpp b/zone/lua_client.cpp index 82167c85b..34906bc00 100644 --- a/zone/lua_client.cpp +++ b/zone/lua_client.cpp @@ -1058,8 +1058,8 @@ bool Lua_Client::GrantAlternateAdvancementAbility(int aa_id, int points, bool ig } void Lua_Client::MarkSingleCompassLoc(float in_x, float in_y, float in_z) { - Lua_Safe_Call_Void(); - self->MarkSingleCompassLoc(in_x, in_y, in_z); + Lua_Safe_Call_Void(); + self->MarkSingleCompassLoc(in_x, in_y, in_z); } void Lua_Client::MarkSingleCompassLoc(float in_x, float in_y, float in_z, int count) { From 0fec2fdfdd37ed882c70f4a1f0154a724bec3fe9 Mon Sep 17 00:00:00 2001 From: Athrogate Date: Tue, 12 Jan 2016 19:08:10 -0800 Subject: [PATCH 04/10] Add Lua_Client::ClearCompassMark(). --- zone/lua_client.cpp | 6 +++--- zone/lua_client.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/zone/lua_client.cpp b/zone/lua_client.cpp index 82167c85b..d77b83c9f 100644 --- a/zone/lua_client.cpp +++ b/zone/lua_client.cpp @@ -1068,8 +1068,8 @@ void Lua_Client::MarkSingleCompassLoc(float in_x, float in_y, float in_z, int co } void Lua_Client::ClearCompassMark() { - Lua_Safe_Call_Void(); - self->MarkSingleCompassLoc(0,0,0,0); + Lua_Safe_Call_Void(); + self->MarkSingleCompassLoc(0,0,0,0); } int Lua_Client::GetNextAvailableSpellBookSlot() { @@ -1553,7 +1553,7 @@ luabind::scope lua_register_client() { .def("GrantAlternateAdvancementAbility", (bool(Lua_Client::*)(int, int, bool))&Lua_Client::GrantAlternateAdvancementAbility) .def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float))&Lua_Client::MarkSingleCompassLoc) .def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float,int))&Lua_Client::MarkSingleCompassLoc) - .def("ClearCompassMark",(void(Lua_Client::*)(void))&Lua_Client::ClearCompassMark) + .def("ClearCompassMark",(void(Lua_Client::*)(void))&Lua_Client::ClearCompassMark) .def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(void))&Lua_Client::GetNextAvailableSpellBookSlot) .def("GetNextAvailableSpellBookSlot", (int(Lua_Client::*)(int))&Lua_Client::GetNextAvailableSpellBookSlot) .def("FindSpellBookSlotBySpellID", (int(Lua_Client::*)(int))&Lua_Client::FindSpellBookSlotBySpellID) diff --git a/zone/lua_client.h b/zone/lua_client.h index 5353996c2..36ea2b8a4 100644 --- a/zone/lua_client.h +++ b/zone/lua_client.h @@ -240,7 +240,7 @@ public: bool GrantAlternateAdvancementAbility(int aa_id, int points, bool ignore_cost); void MarkSingleCompassLoc(float in_x, float in_y, float in_z); void MarkSingleCompassLoc(float in_x, float in_y, float in_z, int count); - void ClearCompassMark(); + void ClearCompassMark(); int GetNextAvailableSpellBookSlot(); int GetNextAvailableSpellBookSlot(int start); int FindSpellBookSlotBySpellID(int spell_id); From f8ce556acb834d0c6a3dd860016150b9ced5906e Mon Sep 17 00:00:00 2001 From: Kinglykrab Date: Wed, 13 Jan 2016 07:58:36 -0500 Subject: [PATCH 05/10] Modified #flag functionality for target-based account status refresh. --- changelog.txt | 4 ++++ zone/command.cpp | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2adec24ba..4db0256cc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 01/13/2016 == +Kinglykrab: Modified #flag so you can refresh your target's account status (GM status level) without them having to relog. + - Just target the person whose flag you want to refresh and type #flag. + == 01/12/2016 == Athrogate: Adding ClearCompassMark() to Lua. - Lua didn't have ClearCompassMark(). Perl already had this. diff --git a/zone/command.cpp b/zone/command.cpp index 3f466fd04..8d4df2b46 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -4395,8 +4395,14 @@ void command_uptime(Client *c, const Seperator *sep) void command_flag(Client *c, const Seperator *sep) { if(sep->arg[2][0] == 0) { - c->UpdateAdmin(); - c->Message(0, "Refreshed your admin flag from DB."); + if (!c->GetTarget() || (c->GetTarget() && c->GetTarget() == c)) { + c->UpdateAdmin(); + c->Message(0, "Refreshed your admin flag from DB."); + } else if (c->GetTarget() && c->GetTarget() != c && c->GetTarget()->IsClient()) { + c->GetTarget()->CastToClient()->UpdateAdmin(); + c->Message(0, "%s's admin flag has been refreshed.", c->GetTarget()->GetName()); + c->GetTarget()->Message(0, "%s refreshed your admin flag.", c->GetName()); + } } else if (!sep->IsNumber(1) || atoi(sep->arg[1]) < -2 || atoi(sep->arg[1]) > 255 || strlen(sep->arg[2]) == 0) c->Message(0, "Usage: #flag [status] [acctname]"); From 6db397f07d71cd8526d5aa8fd0f020cd40b28e23 Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 13 Jan 2016 15:10:21 -0500 Subject: [PATCH 06/10] Added item link functionality to #summonitem (thanks Kinglykrab!) --- changelog.txt | 2 +- zone/command.cpp | 74 ++++++++++++++++++++++++++++++------------------ 2 files changed, 47 insertions(+), 29 deletions(-) diff --git a/changelog.txt b/changelog.txt index 4db0256cc..e23ef39c9 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9,7 +9,7 @@ Athrogate: Adding ClearCompassMark() to Lua. - Lua didn't have ClearCompassMark(). Perl already had this. == 01/12/2016 == -Uleat: Fix for tradeskill containers remaining locked after a RoF+ client leaves. Intermediary fix for RoF+ clients accessing tradeskill containers when in use by another player. +Uleat: Fix for tradeskill containers remaining locked after a RoF+ client leaves. Intermediary fix for RoF+ clients accessing tradeskill containers when in use by another player (thanks Natedog!) == 12/29/2015 == Akkadius: Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true diff --git a/zone/command.cpp b/zone/command.cpp index 8d4df2b46..4c25b25d2 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -5484,36 +5484,54 @@ void command_interrupt(Client *c, const Seperator *sep) void command_summonitem(Client *c, const Seperator *sep) { - if (!sep->IsNumber(1)) - c->Message(0, "Usage: #summonitem [item id] [charges], charges are optional"); - else { - uint32 itemid = atoi(sep->arg[1]); - int16 item_status = 0; - const Item_Struct* item = database.GetItem(itemid); - if(item) { - item_status = static_cast(item->MinStatus); - } + uint32 itemid = 0; - if (item_status > c->Admin()) - c->Message(13, "Error: Insufficient status to summon this item."); - else if (sep->argnum==2 && sep->IsNumber(2)) - c->SummonItem(itemid, atoi(sep->arg[2])); - else if (sep->argnum==3) - c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3])); - else if (sep->argnum==4) - c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); - else if (sep->argnum==5) - c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5])); - else if (sep->argnum==6) - c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6])); - else if (sep->argnum==7) - c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7])); - else if (sep->argnum==8) - c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]), atoi(sep->arg[8])); - else { - c->SummonItem(itemid); - } + std::string cmd_msg = sep->msg; + size_t link_open = cmd_msg.find('\x12'); + size_t link_close = cmd_msg.find_last_of('\x12'); + if (link_open != link_close && (cmd_msg.length() - link_open) > EmuConstants::TEXT_LINK_BODY_LENGTH) { + TextLinkBody_Struct link_body; + Client::TextLink::DegenerateLinkBody(link_body, cmd_msg.substr(link_open + 1, EmuConstants::TEXT_LINK_BODY_LENGTH)); + itemid = link_body.item_id; } + else if (!sep->IsNumber(1)) { + c->Message(0, "Usage: #summonitem [item id | link] [charges], charges are optional"); + return; + } + else { + itemid = atoi(sep->arg[1]); + } + if (!itemid) { + c->Message(0, "A valid item id number is required (derived: 0)"); + return; + } + + int16 item_status = 0; + const Item_Struct* item = database.GetItem(itemid); + if (item) { + item_status = static_cast(item->MinStatus); + } + + if (item_status > c->Admin()) + c->Message(13, "Error: Insufficient status to summon this item."); + else if (sep->argnum == 2 && sep->IsNumber(2)) + c->SummonItem(itemid, atoi(sep->arg[2])); + else if (sep->argnum == 3) + c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3])); + else if (sep->argnum == 4) + c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4])); + else if (sep->argnum == 5) + c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5])); + else if (sep->argnum == 6) + c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6])); + else if (sep->argnum == 7) + c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7])); + else if (sep->argnum == 8) + c->SummonItem(itemid, atoi(sep->arg[2]), atoi(sep->arg[3]), atoi(sep->arg[4]), atoi(sep->arg[5]), atoi(sep->arg[6]), atoi(sep->arg[7]), atoi(sep->arg[8])); + else { + c->SummonItem(itemid); + } + } void command_giveitem(Client *c, const Seperator *sep) From e161805bc9f978324719e9aa1178195aeb4dff6a Mon Sep 17 00:00:00 2001 From: Uleat Date: Wed, 13 Jan 2016 15:25:22 -0500 Subject: [PATCH 07/10] Added changelog entry for #summonitem [itemlink] change --- changelog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.txt b/changelog.txt index e23ef39c9..6bc29becc 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) == 01/13/2016 == Kinglykrab: Modified #flag so you can refresh your target's account status (GM status level) without them having to relog. - Just target the person whose flag you want to refresh and type #flag. +Uleat: Added itemlink functionality to the #summonitem command. Current use is limited to extracting the item id from the link. + - Invoking by item link '#summonitem Arrow' produces the same result as by item id '#summonitem 8005' == 01/12/2016 == Athrogate: Adding ClearCompassMark() to Lua. From f33f3bd4f552b2e6126ef7a3d17743842b90a2ee Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 15 Jan 2016 16:09:23 -0500 Subject: [PATCH 08/10] Fix Drakkin base resists and some missing class bonuses --- zone/client_mods.cpp | 57 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index 06c267fd4..162bffbf8 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -1633,13 +1633,19 @@ int32 Client::CalcMR() MR = 30; break; case DRAKKIN: - MR = 35; + { + MR = 25; + if (GetDrakkinHeritage() == 2) + MR += 10; + else if (GetDrakkinHeritage() == 5) + MR += 2; break; + } default: MR = 20; } MR += itembonuses.MR + spellbonuses.MR + aabonuses.MR; - if (GetClass() == WARRIOR) { + if (GetClass() == WARRIOR || GetClass() == BERSERKER) { MR += GetLevel() / 2; } if (MR < 1) { @@ -1701,8 +1707,14 @@ int32 Client::CalcFR() FR = 25; break; case DRAKKIN: + { FR = 25; + if (GetDrakkinHeritage() == 0) + FR += 10; + else if (GetDrakkinHeritage() == 5) + FR += 2; break; + } default: FR = 20; } @@ -1714,6 +1726,13 @@ int32 Client::CalcFR() FR += l - 49; } } + if (c == MONK) { + FR += 8; + int l = GetLevel(); + if (l > 49) { + FR += l - 49; + } + } FR += itembonuses.FR + spellbonuses.FR + aabonuses.FR; if (FR < 1) { FR = 1; @@ -1774,12 +1793,24 @@ int32 Client::CalcDR() DR = 15; break; case DRAKKIN: + { DR = 15; + if (GetDrakkinHeritage() == 1) + DR += 10; + else if (GetDrakkinHeritage() == 5) + DR += 2; break; + } default: DR = 15; } int c = GetClass(); + // the monk one is part of base resist + if (c == MONK) { + int l = GetLevel(); + if (l > 50) + DR += l - 50; + } if (c == PALADIN) { DR += 8; int l = GetLevel(); @@ -1787,7 +1818,7 @@ int32 Client::CalcDR() DR += l - 49; } } - else if (c == SHADOWKNIGHT) { + else if (c == SHADOWKNIGHT || c == BEASTLORD) { DR += 4; int l = GetLevel(); if (l > 49) { @@ -1854,12 +1885,24 @@ int32 Client::CalcPR() PR = 30; break; case DRAKKIN: + { PR = 15; + if (GetDrakkinHeritage() == 3) + PR += 10; + else if (GetDrakkinHeritage() == 5) + PR += 2; break; + } default: PR = 15; } int c = GetClass(); + // this monk bonus is part of the base + if (c == MONK) { + int l = GetLevel(); + if (l > 50) + PR += l = 50; + } if (c == ROGUE) { PR += 8; int l = GetLevel(); @@ -1934,13 +1977,19 @@ int32 Client::CalcCR() CR = 25; break; case DRAKKIN: + { CR = 25; + if (GetDrakkinHeritage() == 4) + CR += 10; + else if (GetDrakkinHeritage() == 5) + CR += 2; break; + } default: CR = 25; } int c = GetClass(); - if (c == RANGER) { + if (c == RANGER || c == BEASTLORD) { CR += 4; int l = GetLevel(); if (l > 49) { From 42f7e03b040f44107b635feb359ceccfd7e1e1a9 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 15 Jan 2016 17:00:10 -0500 Subject: [PATCH 09/10] Fix typo in last commit --- zone/client_mods.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index 162bffbf8..9fc36a57e 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -1901,7 +1901,7 @@ int32 Client::CalcPR() if (c == MONK) { int l = GetLevel(); if (l > 50) - PR += l = 50; + PR += l - 50; } if (c == ROGUE) { PR += 8; From d7e44643b53045064de4454e409bb1db3815b30a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Fri, 15 Jan 2016 17:20:48 -0500 Subject: [PATCH 10/10] Fix resist display issue for RoF/RoF2 These need to be found for the other clients They are most likely a similar amount of bytes away from the potionbelt in all clients --- common/patches/rof.cpp | 15 ++++++++------- common/patches/rof2.cpp | 15 ++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index 76d62e3a4..988eba916 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -2392,13 +2392,14 @@ namespace RoF outapp->WriteSInt32(234); // Endurance Total ? outapp->WriteSInt32(345); // Mana Total ? - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown + // these are needed to fix display bugs + outapp->WriteUInt32(0x19); // base CR + outapp->WriteUInt32(0x19); // base FR + outapp->WriteUInt32(0x19); // base MR + outapp->WriteUInt32(0xf); // base DR + outapp->WriteUInt32(0xf); // base PR + outapp->WriteUInt32(0xf); // base PhR? + outapp->WriteUInt32(0xf); // base Corrup outapp->WriteUInt32(0); // Unknown outapp->WriteUInt32(0); // Unknown outapp->WriteUInt32(0); // Unknown diff --git a/common/patches/rof2.cpp b/common/patches/rof2.cpp index a8b231300..e0e8f307f 100644 --- a/common/patches/rof2.cpp +++ b/common/patches/rof2.cpp @@ -2471,13 +2471,14 @@ namespace RoF2 outapp->WriteSInt32(234); // Endurance Total ? outapp->WriteSInt32(345); // Mana Total ? - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown - outapp->WriteUInt32(0); // Unknown + // these are needed to fix display bugs + outapp->WriteUInt32(0x19); // base CR + outapp->WriteUInt32(0x19); // base FR + outapp->WriteUInt32(0x19); // base MR + outapp->WriteUInt32(0xf); // base DR + outapp->WriteUInt32(0xf); // base PR + outapp->WriteUInt32(0xf); // base PhR? + outapp->WriteUInt32(0xf); // base Corrup outapp->WriteUInt32(0); // Unknown outapp->WriteUInt32(0); // Unknown outapp->WriteUInt32(0); // Unknown