diff --git a/saco/net/netgame.h b/saco/net/netgame.h index d480e0b..f7ba4ee 100644 --- a/saco/net/netgame.h +++ b/saco/net/netgame.h @@ -105,7 +105,7 @@ public: void SetMapIcon(BYTE byteIndex, float fX, float fY, float fZ, BYTE byteIcon, DWORD dwColor, int iStyle); void DisableMapIcon(BYTE byteIndex); - CMenuPool * GetMenuPool(); // .text:100084F0 + CMenuPool * GetMenuPool() { return m_pPools->pMenuPool; }; // .text:100084F0 int ToggleNameTagStatus(); // .text:10008E90 void sub_1000A540(); // .text:1000A540 }; diff --git a/saco/net/scriptrpc.cpp b/saco/net/scriptrpc.cpp index 3ebecda..bcb37b9 100644 --- a/saco/net/scriptrpc.cpp +++ b/saco/net/scriptrpc.cpp @@ -350,8 +350,36 @@ void ScrUnkB0(RPCParameters *rpcParams) {} void ScrUnkB2(RPCParameters *rpcParams) {} void ScrUnk30(RPCParameters *rpcParams) {} void ScrInitMenu(RPCParameters *rpcParams) {} -void ScrShowMenu(RPCParameters *rpcParams) {} -void ScrHideMenu(RPCParameters *rpcParams) {} +void ScrShowMenu(RPCParameters *rpcParams) +{ + PCHAR Data = reinterpret_cast(rpcParams->input); + int iBitLength = rpcParams->numberOfBitsOfData; + PlayerID sender = rpcParams->sender; + + BYTE byteMenuID; + + RakNet::BitStream bsData(Data,(iBitLength/8)+1,false); + + if(!pNetGame) return; + + bsData.Read(byteMenuID); + pNetGame->GetMenuPool()->ShowMenu(byteMenuID); +} +void ScrHideMenu(RPCParameters *rpcParams) +{ + PCHAR Data = reinterpret_cast(rpcParams->input); + int iBitLength = rpcParams->numberOfBitsOfData; + PlayerID sender = rpcParams->sender; + + BYTE byteMenuID; + + RakNet::BitStream bsData(Data,(iBitLength/8)+1,false); + + if(!pNetGame) return; + + bsData.Read(byteMenuID); + pNetGame->GetMenuPool()->HideMenu(byteMenuID); +} //----------------------------------------------------