[Admin] tierrilopes Posted December 4, 2017 at 03:23 PM Share Posted December 4, 2017 at 03:23 PM client/UserInterface/PythonItem.cpp Add this after the other includes: #include "PythonSkill.h" #include "PythonNonPlayer.h" Look for: void CPythonItem::CreateItem (DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop) Replace with: #ifdef __BOOK_NAME__ void CPythonItem::CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, long lSocket0, bool bDrop) #else void CPythonItem::CreateItem (DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop) #endif Look for: rkTextTail.RegisterItemTextTail ( dwVirtualID, pItemData->GetName(), &pGroundItemInstance->ThingInstance); Replace with: #ifdef __BOOK_NAME__ std::string sItemName = pItemData->GetName(); switch (pItemData->GetType()) { case CItemData::ITEM_TYPE_SKILLBOOK: case CItemData::ITEM_TYPE_SKILLFORGET: if (lSocket0 > 0) { CPythonSkill::SSkillData * c_pSkillData; if (CPythonSkill::Instance().GetSkillData(lSocket0, &c_pSkillData)){ sItemName = c_pSkillData->GradeData[0].strName.c_str(); sItemName += " ";} sItemName += pItemData->GetName();} break; case CItemData::ITEM_TYPE_POLYMORPH: if (lSocket0 > 0) { sItemName = CPythonNonPlayer::Instance().GetMonsterName(lSocket0); sItemName += " "; sItemName += pItemData->GetName();} break; } const char * cItemName = sItemName.c_str(); rkTextTail.RegisterItemTextTail( dwVirtualID, cItemName, &pGroundItemInstance->ThingInstance); #else rkTextTail.RegisterItemTextTail ( dwVirtualID, pItemData->GetName(), &pGroundItemInstance->ThingInstance); #endif client/UserInterface/PythonItem.h Look for: void CreateItem (DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop = true); Replace with: #ifdef __BOOK_NAME__ void CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, long lSocket0 = 0, bool bDrop = true); #else void CreateItem (DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop = true); #endif client/UserInterface/Packet.h Look for: typedef struct packet_ground_add_item { BYTE bHeader; long lX; long lY; long lZ; DWORD dwVID; DWORD dwVnum; } TPacketGCItemGroundAdd; Replace with: typedef struct packet_ground_add_item { BYTE bHeader; long lX; long lY; long lZ; DWORD dwVID; DWORD dwVnum; #ifdef __BOOK_NAME__ long lSocket0; #endif } TPacketGCItemGroundAdd; client/UserInterface/PythonNetworkStreamPhaseGameItem.cpp Inside bool CPythonNetworkStream::RecvItemGroundAddPacket() Look for: CPythonItem::Instance().CreateItem(packet_item_ground_add.dwVID, packet_item_ground_add.dwVnum, packet_item_ground_add.lX, packet_item_ground_add.lY, packet_item_ground_add.lZ); Replace with: #ifdef __BOOK_NAME__ CPythonItem::Instance().CreateItem (packet_item_ground_add.dwVID, packet_item_ground_add.dwVnum, packet_item_ground_add.lX, packet_item_ground_add.lY, packet_item_ground_add.lZ, packet_item_ground_add.lSocket0); #else CPythonItem::Instance().CreateItem(packet_item_ground_add.dwVID, packet_item_ground_add.dwVnum, packet_item_ground_add.lX, packet_item_ground_add.lY, packet_item_ground_add.lZ); #endif client/UserInterface/Locale_inc.h Add the following: #define __BOOK_NAME__ Server game/src/Packet.h Look for: typedef struct packet_item_ground_add { BYTE bHeader; long x, y, z; DWORD dwVID; DWORD dwVnum; } TPacketGCItemGroundAdd; Replace with: typedef struct packet_item_ground_add { BYTE bHeader; long x, y, z; DWORD dwVID; DWORD dwVnum; #ifdef __BOOK_NAME__ long lSocket0; #endif } TPacketGCItemGroundAdd; game/src/item.cpp Inside void CItem::EncodeInsertPacket (LPENTITY ent) Look for: pack.dwVID = m_dwVID; Add this AFTER: #ifdef __BOOK_NAME__ pack.lSocket0 = ((GetType() == ITEM_SKILLBOOK || GetType() == ITEM_SKILLFORGET || GetType() == ITEM_POLYMORPH) ? GetSocket(0) : 0); #endif common/service.h Add the following: #define __BOOK_NAME__ Link to comment Share on other sites More sharing options...
LuizFernando Posted December 4, 2017 at 03:40 PM Share Posted December 4, 2017 at 03:40 PM (edited) Estou com esse seguinte erro. Edited December 4, 2017 at 04:08 PM by LuizFernando Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted December 4, 2017 at 04:50 PM Author Share Posted December 4, 2017 at 04:50 PM PythonItem.cpp, adiciona isto no inicio: #include "PythonSkill.h" #include "PythonNonPlayer.h" _ Adicionado ao tutorial Link to comment Share on other sites More sharing options...
LuizFernando Posted December 4, 2017 at 04:58 PM Share Posted December 4, 2017 at 04:58 PM Ah, ok! Obrigado! Link to comment Share on other sites More sharing options...
LuizFernando Posted December 4, 2017 at 07:04 PM Share Posted December 4, 2017 at 07:04 PM É normal ficar assim? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now