10334 【越南】【英语】【BT】【砍树】境界修改-服务端(修改A235选择境界难度发送的值,支持境界等级超过百位)
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("RealmDifficulty", c_ubyte), #境界难度 = 100 + 所选境界等级,如境界13,则发113
|
| | | ("RealmDifficulty", c_ushort), #境界难度 = 1000 + 所选境界等级,如境界13,则发1013
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | _fields_ = [
|
| | | ("Cmd", c_ubyte),
|
| | | ("SubCmd", c_ubyte),
|
| | | ("RealmDifficulty", c_ubyte), #境界难度 = 100 + 所选境界等级,如境界13,则发113
|
| | | ("RealmDifficulty", c_ushort), #境界难度 = 1000 + 所选境界等级,如境界13,则发1013
|
| | | ]
|
| | |
|
| | | def __init__(self):
|
| | |
| | | #struct tagCMSelectRealmDifficulty
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE RealmDifficulty; //境界难度 = 100 + 所选境界等级,如境界13,则发113
|
| | | # WORD RealmDifficulty; //境界难度 = 1000 + 所选境界等级,如境界13,则发1013
|
| | | #};
|
| | | def OnSelectRealmDifficulty(index, clientData, tick):
|
| | | curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | |
| | | curPlayer.SetExAttr18(realmDifficulty)
|
| | | SendPropertyRefresh(curPlayer, ShareDefine.CDBPlayerRefresh_ExAttr18, realmDifficulty)
|
| | | return
|
| | | def GetDifficultyRealmLV(realmDifficulty): return realmDifficulty - 100
|
| | | def GetDifficultyRealmLV(realmDifficulty): return realmDifficulty % 1000
|
| | | def GetMapRealmDifficulty(curPlayer):
|
| | | ## 获取玩家在本地图中的境界难度层级,必须在境界地图且有选择境界难度才算,否则为默认0;该难度值同时也是视野层级
|
| | | realmDifficulty = GetRealmDifficulty(curPlayer)
|