阅读:2293回复:2
【源码修改】添加功能物品--取消绑定卷
------------------
DPSrvr.cpp ------------------ 搜索代码 caseII_SYS_SYS_SCR_LEVELDOWN01: caseII_SYS_SYS_SCR_LEVELDOWN02: b=DoUseItemTarget_ItemLevelDown(pUser,pMaterial,pTarget); break; default: break; } if(b) 用下面的取代: caseII_SYS_SYS_SCR_LEVELDOWN01: caseII_SYS_SYS_SCR_LEVELDOWN02: b=DoUseItemTarget_ItemLevelDown(pUser,pMaterial,pTarget); break; caseII_CHR_SYS_SCR_UNBIND: b=UnbindScroll(pUser,pMaterial,pTarget); break; default: break; } if(b) 搜索: elsepUser->AddDefinedText(TID_GAME_ITEM_LEVELDOWN01); returnFALSE;} 后面添加: BOOLCDPSrvr::UnbindScroll(CUser*pUser,CItemElem*pMaterial,CItemElem*pTarget) { if(pTarget->IsFlag(CItemElem::binds)&&pMaterial->m_dwItemId==II_CHR_SYS_SCR_UNBIND) {pTarget->ResetFlag(CItemElem::binds); pUser->UpdateItem((BYTE)(pTarget->m_dwObjId),UI_FLAG,MAKELONG(pTarget->m_dwObjIndex,pTarget->m_byFlag)); pUser->AddText("物品已解除绑定."); // log LogItemInfolog;log.Action="r"; log.SendName=pUser->GetName(); log.RecvName="::binds"; log.WorldId=pUser->GetWorld()->GetID(); log.Gold=pUser->GetGold(); log.Gold2=pUser->GetGold(); OnLogItem(log,pTarget,1); returnTRUE; } else pUser->AddText("错误的物品."); returnFALSE; } 源码编辑完成。 接下来添加物品, 在defineItem.h定义 II_CHR_SYS_SCR_UNBIND Spec_Item.txt文件添加物品属性: 11II_CHR_SYS_SCR_UNBIND IDS_ITEM_TXT_10111119999IK1_SYSTEM IK2_SYSTEM IK3_SCROLL==1=200000000=======0==11111====_NONE0=====================================================EXT_ITEM WUI_NOW=========00000================="""Itm_SysSysScrAwakeSafe01.dds"""0""""""IDS_ITEM_TXT_1011121300001000002==========111110 propItem.txt.txt添加说明 IDS_ITEM_TXT_101111 取消唤醒卷 IDS_ITEM_TXT_101112 取消物品绑定属性,物品成为无归属状态 ---------- DPSrvr.h ----------- 这个里面加个定义,看错误也能加上了- - 在这句后面: DoUseItemTarget_ItemLevelDown( CUser* pUser, CItemElem* pMaterial, CItemElem* pTarget ); 添加: BOOL UnbindScroll( CUser* pUser, CItemElem* pMaterial, CItemElem* pTarget ); |
|
100% |
沙发#
发布于:2019-11-20 19:01
不错不错呀
|
|
板凳#
发布于:2020-03-29 15:47
活到老,学到老。
|
|