Decompile fn_22148 (CGameMode::ReceiveShopItemList)
Batch #16439 by eAthena: 1 byte-identical, 0 confirmed by peer review. - fn_22148 CGameMode::ReceiveShopItemList: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
547d4554ed
commit
91db0a63ea
4 changed files with 10 additions and 11 deletions
|
|
@ -649,6 +649,7 @@ public:
|
|||
void SetHotkeySkillLevel(std::uint32_t skillLevel, int index);
|
||||
std::int32_t MemberColor(int index);
|
||||
SessionShop* FindShop(const int& shopId);
|
||||
int FindShopId(std::string name);
|
||||
CSkillInfo* FindGroupedSkill(std::uint32_t id);
|
||||
void AddFriend(MessengerMember& member);
|
||||
void AddPartyMember(MessengerMember& member);
|
||||
|
|
|
|||
|
|
@ -778,14 +778,14 @@ __declspec(noinline) SessionShop* CSession::FindShop(const int& shopId) {
|
|||
|
||||
// OFFSET: 0x00DE3B10
|
||||
// FUNCTION: fn_23485
|
||||
int FindShopId(CSession& session, std::string name) {
|
||||
int CSession::FindShopId(std::string name) {
|
||||
std::string mapName = name;
|
||||
if (mapName.empty()) {
|
||||
mapName = session.m_navigationPlayerMap;
|
||||
mapName = this->m_navigationPlayerMap;
|
||||
}
|
||||
|
||||
const auto found = session.m_nameToId.find(mapName);
|
||||
if (found == session.m_nameToId.end()) {
|
||||
const auto found = this->m_nameToId.find(mapName);
|
||||
if (found == this->m_nameToId.end()) {
|
||||
return -1;
|
||||
}
|
||||
return found->second;
|
||||
|
|
@ -795,7 +795,7 @@ int FindShopId(CSession& session, std::string name) {
|
|||
// FUNCTION: fn_05621
|
||||
bool EquipmentProperties::CEquipmentWearable::UpdateActive() {
|
||||
const bool previous = this->m_active;
|
||||
SessionShop* shop = g_session.FindShop(FindShopId(g_session, std::string()));
|
||||
SessionShop* shop = g_session.FindShop(g_session.FindShopId(""));
|
||||
if (shop != nullptr && !shop->items.empty()) {
|
||||
this->m_active = shop->items[0].find(this->m_id) != shop->items[0].end();
|
||||
} else {
|
||||
|
|
@ -4211,7 +4211,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::RefreshExpansion(const int& k
|
|||
// OFFSET: 0x006B7390
|
||||
// FUNCTION: fn_06206
|
||||
void EquipmentProperties::CEquipmentPropertiesMgr::RefreshShop() {
|
||||
const int shopId = FindShopId(g_session, std::string());
|
||||
const int shopId = g_session.FindShopId("");
|
||||
if (this->shopId != shopId) {
|
||||
for (auto& entry : this->properties1) {
|
||||
const bool previous = entry.second->IsActive();
|
||||
|
|
@ -6144,7 +6144,7 @@ static_assert(offsetof(ShopItemListPacket, entries) == 5);
|
|||
void CGameMode::ReceiveShopItemList(const unsigned char* data) {
|
||||
const ShopItemListPacket* packet = reinterpret_cast<const ShopItemListPacket*>(data);
|
||||
const int count = (packet->length - 5) / sizeof(ShopItemPacketEntry);
|
||||
const int shopId = FindShopId(g_session, std::string());
|
||||
const int shopId = g_session.FindShopId("");
|
||||
if (shopId != -1) {
|
||||
g_session.SetShopFlag(shopId, packet->flag != 0);
|
||||
for (int i = 0; i < count; ++i) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <list>
|
||||
#include <string>
|
||||
|
||||
class CSession;
|
||||
|
||||
namespace EquipmentProperties {
|
||||
class CEquipmentPropertiesMgr;
|
||||
|
|
@ -14,6 +13,5 @@ class CEquipmentPropertiesMgr;
|
|||
|
||||
extern EquipmentProperties::CEquipmentPropertiesMgr* g_equipmentPropertiesMgr;
|
||||
|
||||
int FindShopId(CSession& session, std::string name);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -8211,7 +8211,7 @@ int UISkillDescribeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a,
|
|||
if (g_session.m_hotkeyScript->Call("GetSkillDescript", "ddd>s", g_session.m_job, static_cast<int>(a), b == 0 && c == 0 && d == 1, &description)) {
|
||||
const std::string text = description;
|
||||
if (!text.empty()) {
|
||||
if (FindShopId(g_session, std::string()) != -1) {
|
||||
if (g_session.FindShopId("") != -1) {
|
||||
const int delay = g_session.GetShopEntry(1, this->m_skillId).first;
|
||||
if (delay != 0) {
|
||||
const std::string line = FormatOwnedString(LookupMessage(MSI_FAIL_CALLHOMUN_OVER_100LEVEL), static_cast<int>(delay * 0.1), delay % 10);
|
||||
|
|
@ -9858,7 +9858,7 @@ void UIEquipWnd::DrawEquipSlots() {
|
|||
const int rowOffsets[4] = {0, 26, 52, 78};
|
||||
int iconX[2] = {6, 251};
|
||||
int nameX[2] = {28, 167};
|
||||
int shopId = FindShopId(g_session, std::string());
|
||||
int shopId = g_session.FindShopId("");
|
||||
if (g_session.GetShopType(shopId)) {
|
||||
shopId = -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue