diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset b/Assets/AddressableAssetsData/AddressableAssetSettings.asset index c8e81886cb..07251a1399 100644 --- a/Assets/AddressableAssetsData/AddressableAssetSettings.asset +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset @@ -15,7 +15,7 @@ MonoBehaviour: m_DefaultGroup: 712e3991f28e549e7a56ee582a977810 m_currentHash: serializedVersion: 2 - Hash: 00000000000000000000000000000000 + Hash: 0d3b7a355df1b84783b0b7d14e952d8a m_OptimizeCatalogSize: 0 m_BuildRemoteCatalog: 0 m_CatalogRequestsTimeout: 0 diff --git a/Assets/PerfectWorld/Scripts/Managers/CECNPCMan.cs b/Assets/PerfectWorld/Scripts/Managers/CECNPCMan.cs index 11d399f03e..e2f83e285a 100644 --- a/Assets/PerfectWorld/Scripts/Managers/CECNPCMan.cs +++ b/Assets/PerfectWorld/Scripts/Managers/CECNPCMan.cs @@ -42,12 +42,39 @@ public class CECNPCMan : IMsgHandler case EC_MsgDef.MSG_NM_NPCDIED: OnMsgNPCDied(Msg); break; case EC_MsgDef.MSG_NM_NPCDISAPPEAR: OnMsgNPCDisappear(Msg); break; case EC_MsgDef.MSG_NM_INVALIDOBJECT: OnMsgInvalidObject(Msg); break; - case EC_MsgDef.MSG_NM_NPCATKRESULT: TransmitMessage(Msg); break; + case EC_MsgDef.MSG_NM_FORBIDBESELECTED: OnMsgForbidBeSelected(Msg); break; + + + case EC_MsgDef.MSG_NM_NPCATKRESULT: + case EC_MsgDef.MSG_NM_NPCEXTSTATE: + case EC_MsgDef.MSG_NM_NPCCASTSKILL: + case EC_MsgDef.MSG_NM_ENCHANTRESULT: + case EC_MsgDef.MSG_NM_NPCROOT: + case EC_MsgDef.MSG_NM_NPCSKILLRESULT: + case EC_MsgDef.MSG_NM_NPCLEVELUP: + case EC_MsgDef.MSG_NM_NPCINVISIBLE: + + case EC_MsgDef.MSG_NM_NPCSTARTPLAYACTION: + case EC_MsgDef.MSG_NM_NPCSTOPPLAYACTION: + case EC_MsgDef.MSG_NM_MULTIOBJECT_EFFECT: + TransmitMessage(Msg); break; + } } return true; } + private void OnMsgForbidBeSelected(ECMSG Msg) + { + cmd_object_forbid_be_selected pCmd = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1); + + CECNPC pNPC = GetNPC(pCmd.id); + if (pNPC) + { + pNPC.SetSelectable(pCmd.b == 0); + } + } + private void OnMsgInvalidObject(ECMSG Msg) { int id = (int)Msg.dwParam1; @@ -60,6 +87,7 @@ public class CECNPCMan : IMsgHandler } private void OnMsgNPCOutOfView(ECMSG msg) { + BMLogger.LogError("HoangDev : OnMsgNPCOutOfView (int)msg.dwParam1:"+ (int)msg.dwParam1); NPCLeave((int)msg.dwParam1); } public void Tick() @@ -203,54 +231,53 @@ public class CECNPCMan : IMsgHandler nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).attacker_id; break; - /* case long value when value == EC_MsgDef.MSG_NM_NPCEXTSTATE: - nbvlijuhygtfrde4dws84wi7ujyxfsdcefvgbhjzsxdcfvcgvhjaqzsDRa - nid = ((cmd_update_ext_state*)Msg.dwParam1)->id; - break; + case long value when value == EC_MsgDef.MSG_NM_NPCEXTSTATE: + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).id; + break; - case long value when value == EC_MsgDef.MSG_NM_NPCCASTSKILL: + case long value when value == EC_MsgDef.MSG_NM_NPCCASTSKILL: - nid = ((cmd_object_cast_skill*)Msg.dwParam1)->caster; - break; + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).caster; + break; - case long value when value == EC_MsgDef.MSG_NM_ENCHANTRESULT: + case long value when value == EC_MsgDef.MSG_NM_ENCHANTRESULT: - nid = ((cmd_enchant_result*)Msg.dwParam1)->caster; - break; + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).caster; + break; - case long value when value == EC_MsgDef.MSG_NM_NPCROOT: + case long value when value == EC_MsgDef.MSG_NM_NPCROOT: - nid = ((cmd_object_root*)Msg.dwParam1)->id; - break; + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).id; + break; - case long value when value == EC_MsgDef.MSG_NM_NPCSKILLRESULT: + case long value when value == EC_MsgDef.MSG_NM_NPCSKILLRESULT: - nid = ((cmd_object_skill_attack_result*)Msg.dwParam1)->attacker_id; - break; + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).attacker_id; + break; - case long value when value == EC_MsgDef.MSG_NM_NPCLEVELUP: + case long value when value == EC_MsgDef.MSG_NM_NPCLEVELUP: - nid = ((cmd_level_up*)Msg.dwParam1)->id; - break; + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).id; + break; - case long value when value == EC_MsgDef.MSG_NM_NPCINVISIBLE: + case long value when value == EC_MsgDef.MSG_NM_NPCINVISIBLE: - nid = ((cmd_object_invisible*)Msg.dwParam1)->id; - break; + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).id; + break; - case long value when value == EC_MsgDef.MSG_NM_NPCSTARTPLAYACTION: - nid = ((cmd_object_start_play_action*)Msg.dwParam1)->id; - break; + case long value when value == EC_MsgDef.MSG_NM_NPCSTARTPLAYACTION: + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).id; + break; - case long value when value == EC_MsgDef.MSG_NM_NPCSTOPPLAYACTION: - nid = ((cmd_object_stop_play_action*)Msg.dwParam1)->id; - break; - case long value when value == EC_MsgDef.MSG_NM_MULTIOBJECT_EFFECT: - nid = ((cmd_multiobj_effect*)Msg.dwParam1)->id; - break; + case long value when value == EC_MsgDef.MSG_NM_NPCSTOPPLAYACTION: + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).id; + break; + case long value when value == EC_MsgDef.MSG_NM_MULTIOBJECT_EFFECT: + nid = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1).id; + break; - default: - return false;*/ + default: + return false; } CECNPC pNPC = SeekOutNPC(nid); if (pNPC) @@ -299,7 +326,7 @@ public class CECNPCMan : IMsgHandler private bool OnMsgNPCStopMove(ECMSG msg) { cmd_object_stop_move pCmd = EC_Utility.ByteArrayToStructure((byte[])msg.dwParam1); - if(-2041571143 == pCmd.id) + if (-2041571143 == pCmd.id) { BMLogger.Log("HoangDev: OnMsgNPCStopMove NPCID: " + pCmd.id); } @@ -408,7 +435,7 @@ public class CECNPCMan : IMsgHandler { var buffer = (byte[])msg.dwParam1; cmd_npc_info_00 pCmd = GPDataTypeHelper.FromBytes(buffer); - + CECNPC pNPC = SeekOutNPC(pCmd.idNPC); if (pNPC) { @@ -418,9 +445,9 @@ public class CECNPCMan : IMsgHandler bp.iCurHP = pCmd.iHP; ep.bs.max_hp = pCmd.iMaxHP; pNPC.SetSelectedTarget(pCmd.iTargetID); - pNPC.SetWorldHealthImage((float)pCmd.iHP , (float)pCmd.iMaxHP); + pNPC.SetWorldHealthImage((float)pCmd.iHP, (float)pCmd.iMaxHP); - EventBus.Publish(new CECHostPlayer.NPCINFO(pNPC.GetName(),pCmd.iHP,pCmd.iMaxHP, pCmd.idNPC)); + EventBus.Publish(new CECHostPlayer.NPCINFO(pNPC.GetName(), pCmd.iHP, pCmd.iMaxHP, pCmd.idNPC)); } break; } @@ -517,7 +544,7 @@ public class CECNPCMan : IMsgHandler { switch (dataType) { - case DATA_TYPE.DT_NPC_ESSENCE: + case DATA_TYPE.DT_NPC_ESSENCE: pNPC = CECGameRun.Instance.GetNPCServer(); break; case DATA_TYPE.DT_MONSTER_ESSENCE: diff --git a/Assets/PerfectWorld/Scripts/NPC/CECNPC.cs b/Assets/PerfectWorld/Scripts/NPC/CECNPC.cs index 9c318e99fa..65945a072b 100644 --- a/Assets/PerfectWorld/Scripts/NPC/CECNPC.cs +++ b/Assets/PerfectWorld/Scripts/NPC/CECNPC.cs @@ -8,6 +8,7 @@ using System; using System.Threading.Tasks; using Unity.VisualScripting; using UnityEngine; +using static BrewMonster.CECHostPlayer; public class CECNPC : CECObject { @@ -191,6 +192,35 @@ public class CECNPC : CECObject { case long value when value == EC_MsgDef.MSG_NM_NPCATKRESULT: OnMsgNPCAtkResult(Msg); break; case long value when value == EC_MsgDef.MSG_NM_NPCSTARTPLAYACTION: OnMsgNPCStartPlayAction(Msg); break; + //case long value when value == EC_MsgDef.MSG_NM_NPCEXTSTATE: OnMsgNPCExtState(Msg); break; + //case long value when value == EC_MsgDef.MSG_NM_NPCCASTSKILL: OnMsgNPCCastSkill(Msg); break; + //case long value when value == EC_MsgDef.MSG_NM_ENCHANTRESULT: OnMsgNPCEnchantResult(Msg); break; + //case long value when value == EC_MsgDef.MSG_NM_NPCROOT: OnMsgNPCRoot(Msg); break; + //case long value when value == EC_MsgDef.MSG_NM_NPCSKILLRESULT: OnMsgNPCSkillResult(Msg); break; + case long value when value == EC_MsgDef.MSG_NM_NPCLEVELUP: OnMsgNPCLevel(Msg); break; + case long value when value == EC_MsgDef.MSG_NM_NPCINVISIBLE: OnMsgNPCInvisible(Msg); break; + //case long value when value == EC_MsgDef.MSG_NM_NPCSTOPPLAYACTION: OnMsgNPCStopPlayAction(Msg); break; + //case long value when value == EC_MsgDef.MSG_NM_MULTIOBJECT_EFFECT: OnMsgNPCMultiObjectEffect(Msg); break; + } + } + + private void OnMsgNPCLevel(ECMSG Msg) + { + cmd_level_up pCmd = GPDataTypeHelper.FromBytes((byte[])Msg.dwParam1); + //m_pNPCModelPolicy.PlayGfx(res_GFXFile(RES_GFX_LEVELUP), NULL); + } + + private void OnMsgNPCInvisible(ECMSG Msg) + { + cmd_object_invisible pCmd = GPDataTypeHelper.FromBytes< cmd_object_invisible>((byte[])Msg.dwParam1); + + if (pCmd.invisible_degree > 0) + { + m_dwStates |= PlayerNPCState.GP_STATE_INVISIBLE; + } + else + { + m_dwStates &= ~(uint)PlayerNPCState.GP_STATE_INVISIBLE; } } diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/EC_MsgDef.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/EC_MsgDef.cs index 00844c4031..b7de310651 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/EC_MsgDef.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/EC_MsgDef.cs @@ -5,230 +5,230 @@ namespace CSNetwork public sealed class EC_MsgDef { // Messages to gamerun - public static int MSG_EXITGAME = 100; // Exit game. p1 - exit code, - public static int MSG_CLOSEALLDIALOG = 101; // Close all dialogs - public static int MSG_SERVERTIME = 102; // Server time - public static int MSG_INSTCHECKOUT = 103; // Instance data checkout - public static int MSG_DOUBLETIME = 104; // Double time - public static int MSG_COMMONDATA = 105; // Common data - public static int MSG_MALLITEMINFO = 106; // Mall item info - public static int MSG_DIVIDENDMALLITEMINFO = 107; // Dividend mall item info - public static int MSG_PUBLICQUESTINFO = 108; // Public Quest task info - public static int MSG_WORLDLIFETIME = 109; // World life time info - public static int MSG_ENTERAUTOHOME = 110; // Enter autohome - public static int MSG_LEAVEAUTOHOME = 111; // Leave authhome - public static int MSG_CALCNETWORKDELAY = 112; // Network delay - public static int MSG_PLAYERSPECITEMLIST = 113; // Player spec items - public static int MSG_PARALLEL_WORLD_INFO = 114; // Sharding and load information - public static int MSG_UNIQUE_DATA = 115; // Historical progression data - public static int MSG_RANDOM_MAP_ORDER = 116; + public const int MSG_EXITGAME = 100; // Exit game. p1 - exit code, + public const int MSG_CLOSEALLDIALOG = 101; // Close all dialogs + public const int MSG_SERVERTIME = 102; // Server time + public const int MSG_INSTCHECKOUT = 103; // Instance data checkout + public const int MSG_DOUBLETIME = 104; // Double time + public const int MSG_COMMONDATA = 105; // Common data + public const int MSG_MALLITEMINFO = 106; // Mall item info + public const int MSG_DIVIDENDMALLITEMINFO = 107; // Dividend mall item info + public const int MSG_PUBLICQUESTINFO = 108; // Public Quest task info + public const int MSG_WORLDLIFETIME = 109; // World life time info + public const int MSG_ENTERAUTOHOME = 110; // Enter autohome + public const int MSG_LEAVEAUTOHOME = 111; // Leave authhome + public const int MSG_CALCNETWORKDELAY = 112; // Network delay + public const int MSG_PLAYERSPECITEMLIST = 113; // Player spec items + public const int MSG_PARALLEL_WORLD_INFO = 114; // Sharding and load information + public const int MSG_UNIQUE_DATA = 115; // Historical progression data + public const int MSG_RANDOM_MAP_ORDER = 116; // Messages to host player - public static int MSG_GST_MOVE = 200; // Ghost move. p1 - move dir (0 - 7) - public static int MSG_GST_PITCH = 201; // Ghost pitch, p1 - degree - public static int MSG_GST_YAW = 202; // Ghost yaw, p1 - degree - public static int MSG_GST_MOVEABSUP = 203; // Ghost move absolute up, p1 - 1: up, 0: down + public const int MSG_GST_MOVE = 200; // Ghost move. p1 - move dir (0 - 7) + public const int MSG_GST_PITCH = 201; // Ghost pitch, p1 - degree + public const int MSG_GST_YAW = 202; // Ghost yaw, p1 - degree + public const int MSG_GST_MOVEABSUP = 203; // Ghost move absolute up, p1 - 1: up, 0: down - public static int MSG_HST_CAMERAMODE = 220; // Host camera mode. p1 - camera mode - public static int MSG_HST_PUSHMOVE = 221; // Host player is pushed to move, p1 - move dir (0 - 7) - public static int MSG_HST_PITCH = 222; // Host camera pitch, p1 - degree; p2 - turn player flag - public static int MSG_HST_YAW = 223; // Host camera yaw, p1 - degree; p2 - turn player flag - public static int MSG_HST_LBTNCLICK = 224; // Left button click, p1 - x; p2 - y; p3 - SHIFT, ALT, CTRL key states; p4 - double click flag - public static int MSG_HST_TURNCAM = 225; // Begin or end turning host's camera, p1 - 1: begin, 0: end. p2 - 1: left button, 0: right button - public static int MSG_HST_WHEELCAM = 226; // Move camera using mouse's wheel button - public static int MSG_HST_CAMDEFAULT = 227; // Retrieve system default camera state - public static int MSG_HST_CAMPRESET = 228; // Retrieve system pre-defined camera state - public static int MSG_HST_CAMUSERGET = 229; // Retrieve user defined camera state, p1 - channel - public static int MSG_HST_CAMUSERSET = 230; // Store user defined camera state, p1 - channel - public static int MSG_HST_QUICKVIEW = 231; // Call camera monitor state quickly - public static int MSG_HST_ATKRESULT = 232; // Host attack result - public static int MSG_HST_ATTACKED = 233; // Host was attacked, p1 - data address - public static int MSG_HST_DIED = 234; // Host died - public static int MSG_HST_ASKREVIVE = 235; // Ask revive - public static int MSG_HST_PICKUPMONEY = 236; // Host pickup money - public static int MSG_HST_PICKUPITEM = 237; // Host pickup item - public static int MSG_HST_FOLLOW = 238; // Host follow some else - public static int MSG_HST_RECEIVEEXP = 239; // Received experience, p1 - data address - public static int MSG_HST_INFO00 = 240; // Host information 00, p1 - data address - public static int MSG_HST_GOTO = 241; // Host go to a position, p1 - data address - public static int MSG_HST_OWNITEMINFO = 242; // Host item information, p1 - data address - public static int MSG_HST_GAINITEM = 243; // Gain item in or after trade - public static int MSG_HST_SELTARGET = 244; // Select / unselect target, p1 - data address; p2 - command ID - public static int MSG_HST_FIXCAMERA = 245; // Fix camera + public const int MSG_HST_CAMERAMODE = 220; // Host camera mode. p1 - camera mode + public const int MSG_HST_PUSHMOVE = 221; // Host player is pushed to move, p1 - move dir (0 - 7) + public const int MSG_HST_PITCH = 222; // Host camera pitch, p1 - degree; p2 - turn player flag + public const int MSG_HST_YAW = 223; // Host camera yaw, p1 - degree; p2 - turn player flag + public const int MSG_HST_LBTNCLICK = 224; // Left button click, p1 - x; p2 - y; p3 - SHIFT, ALT, CTRL key states; p4 - double click flag + public const int MSG_HST_TURNCAM = 225; // Begin or end turning host's camera, p1 - 1: begin, 0: end. p2 - 1: left button, 0: right button + public const int MSG_HST_WHEELCAM = 226; // Move camera using mouse's wheel button + public const int MSG_HST_CAMDEFAULT = 227; // Retrieve system default camera state + public const int MSG_HST_CAMPRESET = 228; // Retrieve system pre-defined camera state + public const int MSG_HST_CAMUSERGET = 229; // Retrieve user defined camera state, p1 - channel + public const int MSG_HST_CAMUSERSET = 230; // Store user defined camera state, p1 - channel + public const int MSG_HST_QUICKVIEW = 231; // Call camera monitor state quickly + public const int MSG_HST_ATKRESULT = 232; // Host attack result + public const int MSG_HST_ATTACKED = 233; // Host was attacked, p1 - data address + public const int MSG_HST_DIED = 234; // Host died + public const int MSG_HST_ASKREVIVE = 235; // Ask revive + public const int MSG_HST_PICKUPMONEY = 236; // Host pickup money + public const int MSG_HST_PICKUPITEM = 237; // Host pickup item + public const int MSG_HST_FOLLOW = 238; // Host follow some else + public const int MSG_HST_RECEIVEEXP = 239; // Received experience, p1 - data address + public const int MSG_HST_INFO00 = 240; // Host information 00, p1 - data address + public const int MSG_HST_GOTO = 241; // Host go to a position, p1 - data address + public const int MSG_HST_OWNITEMINFO = 242; // Host item information, p1 - data address + public const int MSG_HST_GAINITEM = 243; // Gain item in or after trade + public const int MSG_HST_SELTARGET = 244; // Select / unselect target, p1 - data address; p2 - command ID + public const int MSG_HST_FIXCAMERA = 245; // Fix camera public const int MSG_HST_OWNEXTPROP = 246; // Host extend properties - public static int MSG_HST_ADDSTATUSPT = 247; // Add status point - public static int MSG_HST_RBTNCLICK = 248; // Left button click, p1 - x; p2 - y; p2 - y; p3 - SHIFT, ALT, CTRL key states - public static int MSG_HST_JOINTEAM = 249; // Host join team - public static int MSG_HST_LEAVETEAM = 250; // Host leave team - public static int MSG_HST_NEWTEAMMEM = 251; // New team member joined - public static int MSG_HST_ITEMOPERATION = 252; // Inventory and equipment item operations - public static int MSG_HST_TEAMINVITE = 253; // Host is invited by a team - public static int MSG_HST_TEAMREJECT = 254; // Host's join requirment is rejected by a team - public static int MSG_HST_TEAMMEMPOS = 255; // Notify host team member position - public static int MSG_HST_TEAMMEMPICKUP = 256; // Host team member pickup item - public static int MSG_HST_EQUIPDAMAGED = 257; // Host equipment damaged - public static int MSG_HST_NPCGREETING = 258; // NPC say greeting to host - public static int MSG_HST_TRADESTART = 259; // Trade with player start - public static int MSG_HST_TRADEREQUEST = 260; // Other player's trade request - public static int MSG_HST_TRADEMOVEITEM = 261; // Move item when trading with other player - public static int MSG_HST_TRADECANCEL = 262; // Host cancel trading with other player - public static int MSG_HST_TRADESUBMIT = 263; // Host submit trading - public static int MSG_HST_TARDECONFIRM = 264; // Host confirm trading - public static int MSG_HST_TRADEEND = 265; // Trade end - public static int MSG_HST_TRADEADDGOODS = 266; // Add goods to trade bar - public static int MSG_HST_TRADEREMGOODS = 267; // Remove goods from trade bar - public static int MSG_HST_IVTRINFO = 268; // Host inventory information - public static int MSG_HST_STARTATTACK = 269; // Host start attack - public static int MSG_HST_PURCHASEITEMS = 270; // Host buy items form NPC or player - public static int MSG_HST_SPENDMONEY = 271; // Host spend money - public static int MSG_HST_ITEMTOMONEY = 272; // Host sell items to NPC - public static int MSG_HST_REPAIR = 273; // Repair items - public static int MSG_HST_USEITEM = 274; // Host use item - public static int MSG_HST_SKILLDATA = 275; // Host skill data - public static int MSG_HST_EMBEDITEM = 276; // Embed item - public static int MSG_HST_CLEARTESSERA = 277; // Clear tessera - public static int MSG_HST_COSTSKILLPT = 278; // Cost skill point - public static int MSG_HST_LEARNSKILL = 279; // Learn skill - public static int MSG_HST_FLYSWORDTIME = 280; // Notify fly sword time - public static int MSG_HST_PRODUCEITEM = 281; // Host produce item - public static int MSG_HST_BREAKITEM = 282; // Host break item - public static int MSG_HST_TASKDATA = 283; // Task data - public static int MSG_HST_TARGETISFAR = 284; // Attack target is too far - public static int MSG_HST_PRESSCANCEL = 285; // User press cancel button - public static int MSG_HST_CANCELACTION = 286; // Cancel host current action - public static int MSG_HST_ROOTNOTIFY = 287; // Dispel root - public static int MSG_HST_STOPATTACK = 288; // Host stop attack - public static int MSG_HST_JUMP = 289; // Test code. jump - public static int MSG_HST_HURTRESULT = 290; // Hurt result - public static int MSG_HST_ATTACKONCE = 291; // Attack once notify - public static int MSG_HST_TRASHBOXOP = 292; // Trash box operation - public static int MSG_HST_PLAYTRICK = 293; // Play trick action - public static int MSG_HST_SKILLRESULT = 294; // Host skill attack result - public static int MSG_HST_SKILLATTACKED = 295; // Host skill attacked - public static int MSG_HST_ASKTOJOINTEAM = 296; // Some ask to join team - public static int MSG_HST_FACTION = 297; // Faction messages - public static int MSG_HST_TASKDELIVER = 298; // Task deliver - public static int MSG_HST_REPUTATION = 299; // Reputation update - public static int MSG_HST_ITEMIDENTIFY = 300; // Item identify - public static int MSG_HST_SANCTUARY = 301; // Sanctuary - public static int MSG_HST_CORRECTPOS = 302; // Correct host position - public static int MSG_HST_FRIENDOPT = 303; // Friend operation - public static int MSG_HST_TEAMINVITETO = 304; // Team invite timeout - public static int MSG_HST_WAYPOINT = 305; // Way point - public static int MSG_HST_BREATHDATA = 306; // Breath data - public static int MSG_HST_SKILLABILITY = 307; // Skill ability - public static int MSG_HST_COOLTIMEDATA = 308; // Cool time data - public static int MSG_HST_REVIVALINQUIRE = 309; // Revival inquire - public static int MSG_HST_SETCOOLTIME = 310; // Set cool time - public static int MSG_HST_CHGTEAMLEADER = 311; // Change team leader - public static int MSG_HST_EXITINSTANCE = 312; // Exit instance notify - public static int MSG_HST_CHANGEFACE = 313; // Host change face - public static int MSG_HST_TEAMMEMBERDATA = 314; // Team member data - public static int MSG_HST_SETMOVESTAMP = 315; // Set move stamp - public static int MSG_HST_CHATROOMOPT = 316; // Chatroom messages - public static int MSG_HST_MAILOPT = 317; // Mail messages - public static int MSG_HST_VENDUEOPT = 318; // Vendue messages - public static int MSG_HST_VIEWOTHEREQUIP = 319; // Get player's equipments - public static int MSG_HST_PARIAHTIME = 320; // Update pariah time - public static int MSG_HST_PETOPT = 321; // Pet operation - public static int MSG_HST_BATTLEOPT = 322; // Battle operation - public static int MSG_HST_ACCOUNTPOINT = 323; // Account point operation - public static int MSG_HST_GMOPT = 324; // GM operation - public static int MSG_HST_REFINEOPT = 325; // Refine operation - public static int MSG_HST_ITEMBOUND = 326; // Item bound result - public static int MSG_HST_USEITEMWITHDATA = 327; // Host use item with data - public static int MSG_HST_SAFELOCK = 328; // Safe lock operation - public static int MSG_HST_GOBLININFO = 329; // Goblin information - public static int MSG_HST_AUTOMOVE = 330; // Player auto move - public static int MSG_HST_BUY_SELL_FAIL = 331; // Player buy or sell failed - public static int MSG_HST_PLAYERPROPERTY = 332; // Player property - public static int MSG_HST_PASSWDCHECKED = 333; // Player's password has checked - public static int MSG_HST_HPSTEAL = 334; // Player steal hp - public static int MSG_HST_MULTI_EXP_INFO = 335; // Player multi exp info - public static int MSG_HST_MULTI_EXP_STATE = 336; // Player change multi exp state - public static int MSG_HST_WEBTRADELIST = 337; // Web trade list re - public static int MSG_HST_WEBTRADEATTENDLIST = 338; // Web trade attend list re - public static int MSG_HST_WEBTRADEGETITEM = 339; // Web trade get item re - public static int MSG_HST_WEBTRADEGETDETAIL = 340; // Web trade get item detail re - public static int MSG_HST_WEBTRADEPREPOST = 341; // Web trade pre-post re - public static int MSG_HST_WEBTRADEPRECANCELPOST = 342; // Web trade cancel post re - public static int MSG_HST_WEBTRADEUPDATE = 343; // Web trade update re - public static int MSG_HST_SYSAUCTIONACCOUNT = 344; // Sys Auction Account re - public static int MSG_HST_SYSAUCTIONBID = 345; // Sys Auction Bid re - public static int MSG_HST_SYSAUCTIONCASHTRANSFER = 346; // Sys Auction Cash Transfer re - public static int MSG_HST_SYSAUCTIONGETITEM = 347; // Sys Auction Get Item re - public static int MSG_HST_SYSAUCTIONLIST = 348; // Sys Auction List re - public static int MSG_HST_ONLINEAWARD = 349; // Online award + public const int MSG_HST_ADDSTATUSPT = 247; // Add status point + public const int MSG_HST_RBTNCLICK = 248; // Left button click, p1 - x; p2 - y; p2 - y; p3 - SHIFT, ALT, CTRL key states + public const int MSG_HST_JOINTEAM = 249; // Host join team + public const int MSG_HST_LEAVETEAM = 250; // Host leave team + public const int MSG_HST_NEWTEAMMEM = 251; // New team member joined + public const int MSG_HST_ITEMOPERATION = 252; // Inventory and equipment item operations + public const int MSG_HST_TEAMINVITE = 253; // Host is invited by a team + public const int MSG_HST_TEAMREJECT = 254; // Host's join requirment is rejected by a team + public const int MSG_HST_TEAMMEMPOS = 255; // Notify host team member position + public const int MSG_HST_TEAMMEMPICKUP = 256; // Host team member pickup item + public const int MSG_HST_EQUIPDAMAGED = 257; // Host equipment damaged + public const int MSG_HST_NPCGREETING = 258; // NPC say greeting to host + public const int MSG_HST_TRADESTART = 259; // Trade with player start + public const int MSG_HST_TRADEREQUEST = 260; // Other player's trade request + public const int MSG_HST_TRADEMOVEITEM = 261; // Move item when trading with other player + public const int MSG_HST_TRADECANCEL = 262; // Host cancel trading with other player + public const int MSG_HST_TRADESUBMIT = 263; // Host submit trading + public const int MSG_HST_TARDECONFIRM = 264; // Host confirm trading + public const int MSG_HST_TRADEEND = 265; // Trade end + public const int MSG_HST_TRADEADDGOODS = 266; // Add goods to trade bar + public const int MSG_HST_TRADEREMGOODS = 267; // Remove goods from trade bar + public const int MSG_HST_IVTRINFO = 268; // Host inventory information + public const int MSG_HST_STARTATTACK = 269; // Host start attack + public const int MSG_HST_PURCHASEITEMS = 270; // Host buy items form NPC or player + public const int MSG_HST_SPENDMONEY = 271; // Host spend money + public const int MSG_HST_ITEMTOMONEY = 272; // Host sell items to NPC + public const int MSG_HST_REPAIR = 273; // Repair items + public const int MSG_HST_USEITEM = 274; // Host use item + public const int MSG_HST_SKILLDATA = 275; // Host skill data + public const int MSG_HST_EMBEDITEM = 276; // Embed item + public const int MSG_HST_CLEARTESSERA = 277; // Clear tessera + public const int MSG_HST_COSTSKILLPT = 278; // Cost skill point + public const int MSG_HST_LEARNSKILL = 279; // Learn skill + public const int MSG_HST_FLYSWORDTIME = 280; // Notify fly sword time + public const int MSG_HST_PRODUCEITEM = 281; // Host produce item + public const int MSG_HST_BREAKITEM = 282; // Host break item + public const int MSG_HST_TASKDATA = 283; // Task data + public const int MSG_HST_TARGETISFAR = 284; // Attack target is too far + public const int MSG_HST_PRESSCANCEL = 285; // User press cancel button + public const int MSG_HST_CANCELACTION = 286; // Cancel host current action + public const int MSG_HST_ROOTNOTIFY = 287; // Dispel root + public const int MSG_HST_STOPATTACK = 288; // Host stop attack + public const int MSG_HST_JUMP = 289; // Test code. jump + public const int MSG_HST_HURTRESULT = 290; // Hurt result + public const int MSG_HST_ATTACKONCE = 291; // Attack once notify + public const int MSG_HST_TRASHBOXOP = 292; // Trash box operation + public const int MSG_HST_PLAYTRICK = 293; // Play trick action + public const int MSG_HST_SKILLRESULT = 294; // Host skill attack result + public const int MSG_HST_SKILLATTACKED = 295; // Host skill attacked + public const int MSG_HST_ASKTOJOINTEAM = 296; // Some ask to join team + public const int MSG_HST_FACTION = 297; // Faction messages + public const int MSG_HST_TASKDELIVER = 298; // Task deliver + public const int MSG_HST_REPUTATION = 299; // Reputation update + public const int MSG_HST_ITEMIDENTIFY = 300; // Item identify + public const int MSG_HST_SANCTUARY = 301; // Sanctuary + public const int MSG_HST_CORRECTPOS = 302; // Correct host position + public const int MSG_HST_FRIENDOPT = 303; // Friend operation + public const int MSG_HST_TEAMINVITETO = 304; // Team invite timeout + public const int MSG_HST_WAYPOINT = 305; // Way point + public const int MSG_HST_BREATHDATA = 306; // Breath data + public const int MSG_HST_SKILLABILITY = 307; // Skill ability + public const int MSG_HST_COOLTIMEDATA = 308; // Cool time data + public const int MSG_HST_REVIVALINQUIRE = 309; // Revival inquire + public const int MSG_HST_SETCOOLTIME = 310; // Set cool time + public const int MSG_HST_CHGTEAMLEADER = 311; // Change team leader + public const int MSG_HST_EXITINSTANCE = 312; // Exit instance notify + public const int MSG_HST_CHANGEFACE = 313; // Host change face + public const int MSG_HST_TEAMMEMBERDATA = 314; // Team member data + public const int MSG_HST_SETMOVESTAMP = 315; // Set move stamp + public const int MSG_HST_CHATROOMOPT = 316; // Chatroom messages + public const int MSG_HST_MAILOPT = 317; // Mail messages + public const int MSG_HST_VENDUEOPT = 318; // Vendue messages + public const int MSG_HST_VIEWOTHEREQUIP = 319; // Get player's equipments + public const int MSG_HST_PARIAHTIME = 320; // Update pariah time + public const int MSG_HST_PETOPT = 321; // Pet operation + public const int MSG_HST_BATTLEOPT = 322; // Battle operation + public const int MSG_HST_ACCOUNTPOINT = 323; // Account point operation + public const int MSG_HST_GMOPT = 324; // GM operation + public const int MSG_HST_REFINEOPT = 325; // Refine operation + public const int MSG_HST_ITEMBOUND = 326; // Item bound result + public const int MSG_HST_USEITEMWITHDATA = 327; // Host use item with data + public const int MSG_HST_SAFELOCK = 328; // Safe lock operation + public const int MSG_HST_GOBLININFO = 329; // Goblin information + public const int MSG_HST_AUTOMOVE = 330; // Player auto move + public const int MSG_HST_BUY_SELL_FAIL = 331; // Player buy or sell failed + public const int MSG_HST_PLAYERPROPERTY = 332; // Player property + public const int MSG_HST_PASSWDCHECKED = 333; // Player's password has checked + public const int MSG_HST_HPSTEAL = 334; // Player steal hp + public const int MSG_HST_MULTI_EXP_INFO = 335; // Player multi exp info + public const int MSG_HST_MULTI_EXP_STATE = 336; // Player change multi exp state + public const int MSG_HST_WEBTRADELIST = 337; // Web trade list re + public const int MSG_HST_WEBTRADEATTENDLIST = 338; // Web trade attend list re + public const int MSG_HST_WEBTRADEGETITEM = 339; // Web trade get item re + public const int MSG_HST_WEBTRADEGETDETAIL = 340; // Web trade get item detail re + public const int MSG_HST_WEBTRADEPREPOST = 341; // Web trade pre-post re + public const int MSG_HST_WEBTRADEPRECANCELPOST = 342; // Web trade cancel post re + public const int MSG_HST_WEBTRADEUPDATE = 343; // Web trade update re + public const int MSG_HST_SYSAUCTIONACCOUNT = 344; // Sys Auction Account re + public const int MSG_HST_SYSAUCTIONBID = 345; // Sys Auction Bid re + public const int MSG_HST_SYSAUCTIONCASHTRANSFER = 346; // Sys Auction Cash Transfer re + public const int MSG_HST_SYSAUCTIONGETITEM = 347; // Sys Auction Get Item re + public const int MSG_HST_SYSAUCTIONLIST = 348; // Sys Auction List re + public const int MSG_HST_ONLINEAWARD = 349; // Online award // Continue later; do not add more here // Messages to player manager - public static int MSG_PM_PLAYERINFO = 350; // Player information, p1 - data address; p2 - command ID - public static int MSG_PM_PLAYERMOVE = 351; // Player move, p1 - data address - public static int MSG_PM_PLAYERRUNOUT = 352; // Player run out of view area, p1 - data address - public static int MSG_PM_PLAYEREXIT = 353; // Player exit game, p1 - data address - public static int MSG_PM_CHANGENAMECOLOR = 354; // Change player's name color - public static int MSG_PM_PLAYERROOT = 355; // Player is root - public static int MSG_PM_PLAYERDIED = 356; // Player was killed, p1 - data address - public static int MSG_PM_PLAYERREVIVE = 357; // Player revive, p1 - data address - public static int MSG_PM_PLAYEROUTOFVIEW = 358; // Player is out of view, p1 - player's ID - public static int MSG_PM_PLAYERDISAPPEAR = 359; // Player disappear, p1 - data address - public static int MSG_PM_PLAYERSTOPMOVE = 360; // Player stop move, p1 - data address - public static int MSG_PM_PLAYERLEVELUP = 361; // Player level up + public const int MSG_PM_PLAYERINFO = 350; // Player information, p1 - data address; p2 - command ID + public const int MSG_PM_PLAYERMOVE = 351; // Player move, p1 - data address + public const int MSG_PM_PLAYERRUNOUT = 352; // Player run out of view area, p1 - data address + public const int MSG_PM_PLAYEREXIT = 353; // Player exit game, p1 - data address + public const int MSG_PM_CHANGENAMECOLOR = 354; // Change player's name color + public const int MSG_PM_PLAYERROOT = 355; // Player is root + public const int MSG_PM_PLAYERDIED = 356; // Player was killed, p1 - data address + public const int MSG_PM_PLAYERREVIVE = 357; // Player revive, p1 - data address + public const int MSG_PM_PLAYEROUTOFVIEW = 358; // Player is out of view, p1 - player's ID + public const int MSG_PM_PLAYERDISAPPEAR = 359; // Player disappear, p1 - data address + public const int MSG_PM_PLAYERSTOPMOVE = 360; // Player stop move, p1 - data address + public const int MSG_PM_PLAYERLEVELUP = 361; // Player level up public const int MSG_PM_PLAYEREXTPROP = 362; // Player extend properties // #define MSG_PM_TEAMMEMBERDATA 363 // Team member data - public static int MSG_PM_LEAVETEAM = 364; // Player leave team - public static int MSG_PM_PLAYEREQUIPDATA = 365; // Player equipment data + public const int MSG_PM_LEAVETEAM = 364; // Player leave team + public const int MSG_PM_PLAYEREQUIPDATA = 365; // Player equipment data public const int MSG_PM_CASTSKILL = 366; // Player cast skill public const int MSG_PM_PLAYERBASEINFO = 367; // Player custom data - public static int MSG_PM_PLAYERFLY = 368; // Player take off or land on - public static int MSG_PM_PLAYERSITDOWN = 369; // Player sit down / stand up + public const int MSG_PM_PLAYERFLY = 368; // Player take off or land on + public const int MSG_PM_PLAYERSITDOWN = 369; // Player sit down / stand up public const int MSG_PM_PLAYERATKRESULT = 370; // Player attack result - public static int MSG_PM_PLAYEREXTSTATE = 371; // Player extend states changed + public const int MSG_PM_PLAYEREXTSTATE = 371; // Player extend states changed public const int MSG_PM_PLAYERDOEMOTE = 372; // Player do emotion - public static int MSG_PM_PLAYERUSEITEM = 373; // Player use item - public static int MSG_PM_PLAYERCUSTOM = 374; // Player custom data - public static int MSG_PM_ENCHANTRESULT = 375; // Enchant result - public static int MSG_PM_PLAYERDOACTION = 376; // Player do action - public static int MSG_PM_PLAYERSKILLRESULT = 377; // Player skill attack result - public static int MSG_PM_PLAYERADVDATA = 378; // Player advertisement data - public static int MSG_PM_PLAYERINTEAM = 379; // Player in team notify + public const int MSG_PM_PLAYERUSEITEM = 373; // Player use item + public const int MSG_PM_PLAYERCUSTOM = 374; // Player custom data + public const int MSG_PM_ENCHANTRESULT = 375; // Enchant result + public const int MSG_PM_PLAYERDOACTION = 376; // Player do action + public const int MSG_PM_PLAYERSKILLRESULT = 377; // Player skill attack result + public const int MSG_PM_PLAYERADVDATA = 378; // Player advertisement data + public const int MSG_PM_PLAYERINTEAM = 379; // Player in team notify public const int MSG_PM_PICKUPMATTER = 380; // Player pickup a matter - public static int MSG_PM_PLAYERGATHER = 381; // Player gather mine - public static int MSG_PM_DOCONEMOTE = 382; // Player do concurrent emotion - public static int MSG_PM_PLAYERCHGSHAPE = 383; // Player change shape - public static int MSG_PM_BOOTHOPT = 384; // Booth operation - public static int MSG_PM_PLAYERTRAVEL = 385; // Player travel service - public static int MSG_PM_PLAYERPVP = 386; // Player PVP messages - public static int MSG_PM_FASHIONENABLE = 387; // Player enable/disable fashion - public static int MSG_PM_INVALIDOBJECT = 388; // Object is invalid - public static int MSG_PM_PLAYEREFFECT = 389; // Player effect association - public static int MSG_PM_CHANGEFACE = 390; // Player change face - public static int MSG_PM_DUELOPT = 391; // Duel operation - public static int MSG_PM_PLAYERBINDOPT = 392; // Player bind operation - public static int MSG_PM_PLAYERBINDSTART = 393; // Player bind start - public static int MSG_PM_PLAYERMOUNT = 394; // Player mount state - public static int MSG_PM_PLAYERDUELOPT = 395; // Player duel operation - public static int MSG_PM_PLAYERDUELRLT = 396; // Player duel result - public static int MSG_PM_PLAYERLEVEL2 = 397; // Player level2 notify - public static int MSG_PM_TANKLEADER = 398; // Tank leader notify - public static int MSG_PM_USEITEMWITHDATA = 399; - public static int MSG_PM_PLAYERCHANGESPOUSE = 400; // Player change the spouse - public static int MSG_PM_GOBLINOPT = 401; // Goblin operation: Cast skill, change refine active... - public static int MSG_PM_GOBLINLEVELUP = 402; // Goblin level up - public static int MSG_PM_PLAYERINVISIBLE = 403; // Player invisible - public static int MSG_PM_PLAYERKNOCKBACK = 404; // Player knock back - public static int MSG_PM_PLAYEREQUIPDISABLED = 405; // Player equipment disabled - public static int MSG_PM_CONGREGATE = 406; // Congregate related - public static int MSG_PM_TELEPORT = 407; // teleport - public static int MSG_PM_FORBIDBESELECTED = 408; // forbid to be selected - public static int MSG_PM_FORCE_CHANGED = 409; // a player changed his force - public static int MSG_PM_MULTIOBJ_EFFECT = 410; // player's multi object effect - public static int MSG_PM_COUNTRY_CHANGED = 411; - public static int MSG_PM_KINGCHANGED = 412; - public static int MSG_PM_TITLE = 413; // player's titles - public static int MSG_PM_REINCARNATION = 414; - public static int MSG_PM_REALMLEVEL = 415; - public static int MSG_PM_PLAYER_IN_OUT_BATTLE = 416; + public const int MSG_PM_PLAYERGATHER = 381; // Player gather mine + public const int MSG_PM_DOCONEMOTE = 382; // Player do concurrent emotion + public const int MSG_PM_PLAYERCHGSHAPE = 383; // Player change shape + public const int MSG_PM_BOOTHOPT = 384; // Booth operation + public const int MSG_PM_PLAYERTRAVEL = 385; // Player travel service + public const int MSG_PM_PLAYERPVP = 386; // Player PVP messages + public const int MSG_PM_FASHIONENABLE = 387; // Player enable/disable fashion + public const int MSG_PM_INVALIDOBJECT = 388; // Object is invalid + public const int MSG_PM_PLAYEREFFECT = 389; // Player effect association + public const int MSG_PM_CHANGEFACE = 390; // Player change face + public const int MSG_PM_DUELOPT = 391; // Duel operation + public const int MSG_PM_PLAYERBINDOPT = 392; // Player bind operation + public const int MSG_PM_PLAYERBINDSTART = 393; // Player bind start + public const int MSG_PM_PLAYERMOUNT = 394; // Player mount state + public const int MSG_PM_PLAYERDUELOPT = 395; // Player duel operation + public const int MSG_PM_PLAYERDUELRLT = 396; // Player duel result + public const int MSG_PM_PLAYERLEVEL2 = 397; // Player level2 notify + public const int MSG_PM_TANKLEADER = 398; // Tank leader notify + public const int MSG_PM_USEITEMWITHDATA = 399; + public const int MSG_PM_PLAYERCHANGESPOUSE = 400; // Player change the spouse + public const int MSG_PM_GOBLINOPT = 401; // Goblin operation: Cast skill, change refine active... + public const int MSG_PM_GOBLINLEVELUP = 402; // Goblin level up + public const int MSG_PM_PLAYERINVISIBLE = 403; // Player invisible + public const int MSG_PM_PLAYERKNOCKBACK = 404; // Player knock back + public const int MSG_PM_PLAYEREQUIPDISABLED = 405; // Player equipment disabled + public const int MSG_PM_CONGREGATE = 406; // Congregate related + public const int MSG_PM_TELEPORT = 407; // teleport + public const int MSG_PM_FORBIDBESELECTED = 408; // forbid to be selected + public const int MSG_PM_FORCE_CHANGED = 409; // a player changed his force + public const int MSG_PM_MULTIOBJ_EFFECT = 410; // player's multi object effect + public const int MSG_PM_COUNTRY_CHANGED = 411; + public const int MSG_PM_KINGCHANGED = 412; + public const int MSG_PM_TITLE = 413; // player's titles + public const int MSG_PM_REINCARNATION = 414; + public const int MSG_PM_REALMLEVEL = 415; + public const int MSG_PM_PLAYER_IN_OUT_BATTLE = 416; public const int MSG_PM_FACTION_PVP_MASK_MODIFY = 417; // Messages to NPC manager @@ -242,77 +242,77 @@ namespace CSNetwork public const int MSG_NM_NPCOUTOFVIEW = 407; // NPC is out of view, p1 - NPC's ID public const int MSG_NM_NPCSTOPMOVE = 408; // NPC stop moving, p1 - data address public const int MSG_NM_NPCATKRESULT = 409; // NPC attack result - public static int MSG_NM_NPCEXTSTATE = 410; // NPC extend states changed - public static int MSG_NM_ENCHANTRESULT = 411; // Enchant result - public static int MSG_NM_NPCSKILLRESULT = 412; // NPC skill attack result + public const int MSG_NM_NPCEXTSTATE = 410; // NPC extend states changed + public const int MSG_NM_ENCHANTRESULT = 411; // Enchant result + public const int MSG_NM_NPCSKILLRESULT = 412; // NPC skill attack result public const int MSG_NM_INVALIDOBJECT = 413; // Object is invalid - public static int MSG_NM_NPCLEVELUP = 414; // NPC level up - public static int MSG_NM_NPCINVISIBLE = 415; // NPC invisible - public static int MSG_NM_NPCSTARTPLAYACTION = 416; // NPC play policy action - public static int MSG_NM_NPCSTOPPLAYACTION = 417; // NPC stop play policy action - public static int MSG_NM_FORBIDBESELECTED = 418; // forbid to be selected - public static int MSG_NM_MULTIOBJECT_EFFECT = 419; // NPC's multi object effect + public const int MSG_NM_NPCLEVELUP = 414; // NPC level up + public const int MSG_NM_NPCINVISIBLE = 415; // NPC invisible + public const int MSG_NM_NPCSTARTPLAYACTION = 416; // NPC play policy action + public const int MSG_NM_NPCSTOPPLAYACTION = 417; // NPC stop play policy action + public const int MSG_NM_FORBIDBESELECTED = 418; // forbid to be selected + public const int MSG_NM_MULTIOBJECT_EFFECT = 419; // NPC's multi object effect // Messages to matter manager - public static int MSG_MM_MATTERINFO = 500; // Matter information, p1 - data address - public static int MSG_MM_MATTERDISAPPEAR = 501; // Matter disappear, p1 - data address - public static int MSG_MM_MATTERENTWORLD = 502; // Matter enter world, p1 - data address - public static int MSG_MM_MATTEROUTOFVIEW = 503; // Matter is out of view, p1 - data address - public static int MSG_MM_INVALIDOBJECT = 504; // Object is invalid + public const int MSG_MM_MATTERINFO = 500; // Matter information, p1 - data address + public const int MSG_MM_MATTERDISAPPEAR = 501; // Matter disappear, p1 - data address + public const int MSG_MM_MATTERENTWORLD = 502; // Matter enter world, p1 - data address + public const int MSG_MM_MATTEROUTOFVIEW = 503; // Matter is out of view, p1 - data address + public const int MSG_MM_INVALIDOBJECT = 504; // Object is invalid // Messages to host player cont. - public static int MSG_HST_WEDDINGBOOKLIST = 600; // wedding book list - public static int MSG_HST_WEDDINGBOOKSUCCESS = 601; // wedding book success notify - public static int MSG_HST_FACTIONCONTRIB = 602; // faction contrib - public static int MSG_HST_FACTIONFORTRESSINFO = 603; // faction fortress info - public static int MSG_HST_ENTERFACTIONFORTRESS = 604; // enter faction fortress - public static int MSG_HST_ENGRAVEITEM = 605; // engrave item - public static int MSG_HST_DPS_DPH_RANK = 606; // current dps dph rank - public static int MSG_HST_ADDONREGEN = 607; // regenerate item addon - public static int MSG_HST_INVISIBLEOBJLIST = 608; // invisible object list notify - public static int MSG_HST_SETPLAYERLIMIT = 609; // set player limit - public static int MSG_HST_FORCE_DATA = 610; // Player force data (get or changed) - public static int MSG_HST_INVENTORY_DETAIL = 611; // Get other player's inventory detail info - public static int MSG_HST_ADD_MULTIOBJECT_EFFECT = 612; // Add multi object effect - public static int MSG_HST_WEDDINGSCENE_INFO = 613; // whose wedding scene the player is entering - public static int MSG_HST_PROFITTIME = 614; // change the player's profit level - public static int MSG_HST_PVPNOPENALTY = 615; // PVP no penalty - public static int MSG_HST_COUNTRY_NOTIFY = 616; - public static int MSG_HST_ENTER_COUNTRYBATTLE = 617; - public static int MSG_HST_COUNTRYBATTLE_RESULT = 618; - public static int MSG_HST_COUNTRYBATTLE_SCORE = 619; - public static int MSG_HST_COUNTRYBATTLE_REVIVE_TIMES = 620; - public static int MSG_HST_COUNTRYBATTLE_CARRIER_NOTIFY = 621; - public static int MSG_HST_COUNTRYBATTLE_BECOME_CARRIER = 622; - public static int MSG_HST_COUNTRYBATTLE_PERSONAL_SCORE = 623; - public static int MSG_HST_COUNTRYBATTLE_FLAG_MSG_NOTIFY = 624; - public static int MSG_HST_DEFENSE_RUNE_ENABLE = 625; - public static int MSG_HST_COUNTRYBATTLE_INFO = 626; - public static int MSG_HST_CASHMONEYRATE = 627; - public static int MSG_HST_STONECHANGEEND = 628; - public static int MSG_HST_KINGNOTIFY = 629; - public static int MSG_HST_MERIDIANS_NOTIFY = 630; - public static int MSG_HST_MERIDIANS_RESULT = 631; - public static int MSG_HST_COUNTRYBATTLE_STRONGHOLD_STATE = 632; - public static int MSG_HST_TOUCHPOINT = 633; // Touch related - public static int MSG_HST_TITLE = 644; // Title related - public static int MSG_HST_SIGNIN = 645; - public static int MSG_HST_REINCARNATION_TOME_INFO = 646; - public static int MSG_HST_REINCARNATION_TOME_ACTIVATE = 647; - public static int MSG_HST_USE_GIFTCARD = 648; // Use gift card - public static int MSG_HST_REALM_EXP = 649; - public static int MSG_HST_TRICKBATTLE = 650; - public static int MSG_HST_CONTINUECOMBOSKILL = 651; - public static int MSG_HST_GENERALCARD = 652; - public static int MSG_HST_MONSTERSPIRIT_LEVEL = 653; - public static int MSG_HST_COUNTRYBATTLE_LIVESHOW = 654; - public static int MSG_HST_RAND_MALL_SHOPPING_RES = 655; - public static int MSG_HST_WORLD_CONTRIBUTION = 656; - public static int MSG_HST_CANINHERIT_ADDONS = 657; - public static int MSG_HST_CLIENT_SCREENEFFECT = 658; - public static int MSG_HST_COMBO_SKILL_PREPARE = 659; - public static int MSG_HST_INSTANCE_REENTER_NOTIFY = 660; - public static int MSG_HST_PRAY_DISTANCE_CHANGE = 661; + public const int MSG_HST_WEDDINGBOOKLIST = 600; // wedding book list + public const int MSG_HST_WEDDINGBOOKSUCCESS = 601; // wedding book success notify + public const int MSG_HST_FACTIONCONTRIB = 602; // faction contrib + public const int MSG_HST_FACTIONFORTRESSINFO = 603; // faction fortress info + public const int MSG_HST_ENTERFACTIONFORTRESS = 604; // enter faction fortress + public const int MSG_HST_ENGRAVEITEM = 605; // engrave item + public const int MSG_HST_DPS_DPH_RANK = 606; // current dps dph rank + public const int MSG_HST_ADDONREGEN = 607; // regenerate item addon + public const int MSG_HST_INVISIBLEOBJLIST = 608; // invisible object list notify + public const int MSG_HST_SETPLAYERLIMIT = 609; // set player limit + public const int MSG_HST_FORCE_DATA = 610; // Player force data (get or changed) + public const int MSG_HST_INVENTORY_DETAIL = 611; // Get other player's inventory detail info + public const int MSG_HST_ADD_MULTIOBJECT_EFFECT = 612; // Add multi object effect + public const int MSG_HST_WEDDINGSCENE_INFO = 613; // whose wedding scene the player is entering + public const int MSG_HST_PROFITTIME = 614; // change the player's profit level + public const int MSG_HST_PVPNOPENALTY = 615; // PVP no penalty + public const int MSG_HST_COUNTRY_NOTIFY = 616; + public const int MSG_HST_ENTER_COUNTRYBATTLE = 617; + public const int MSG_HST_COUNTRYBATTLE_RESULT = 618; + public const int MSG_HST_COUNTRYBATTLE_SCORE = 619; + public const int MSG_HST_COUNTRYBATTLE_REVIVE_TIMES = 620; + public const int MSG_HST_COUNTRYBATTLE_CARRIER_NOTIFY = 621; + public const int MSG_HST_COUNTRYBATTLE_BECOME_CARRIER = 622; + public const int MSG_HST_COUNTRYBATTLE_PERSONAL_SCORE = 623; + public const int MSG_HST_COUNTRYBATTLE_FLAG_MSG_NOTIFY = 624; + public const int MSG_HST_DEFENSE_RUNE_ENABLE = 625; + public const int MSG_HST_COUNTRYBATTLE_INFO = 626; + public const int MSG_HST_CASHMONEYRATE = 627; + public const int MSG_HST_STONECHANGEEND = 628; + public const int MSG_HST_KINGNOTIFY = 629; + public const int MSG_HST_MERIDIANS_NOTIFY = 630; + public const int MSG_HST_MERIDIANS_RESULT = 631; + public const int MSG_HST_COUNTRYBATTLE_STRONGHOLD_STATE = 632; + public const int MSG_HST_TOUCHPOINT = 633; // Touch related + public const int MSG_HST_TITLE = 644; // Title related + public const int MSG_HST_SIGNIN = 645; + public const int MSG_HST_REINCARNATION_TOME_INFO = 646; + public const int MSG_HST_REINCARNATION_TOME_ACTIVATE = 647; + public const int MSG_HST_USE_GIFTCARD = 648; // Use gift card + public const int MSG_HST_REALM_EXP = 649; + public const int MSG_HST_TRICKBATTLE = 650; + public const int MSG_HST_CONTINUECOMBOSKILL = 651; + public const int MSG_HST_GENERALCARD = 652; + public const int MSG_HST_MONSTERSPIRIT_LEVEL = 653; + public const int MSG_HST_COUNTRYBATTLE_LIVESHOW = 654; + public const int MSG_HST_RAND_MALL_SHOPPING_RES = 655; + public const int MSG_HST_WORLD_CONTRIBUTION = 656; + public const int MSG_HST_CANINHERIT_ADDONS = 657; + public const int MSG_HST_CLIENT_SCREENEFFECT = 658; + public const int MSG_HST_COMBO_SKILL_PREPARE = 659; + public const int MSG_HST_INSTANCE_REENTER_NOTIFY = 660; + public const int MSG_HST_PRAY_DISTANCE_CHANGE = 661; } diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GPDataType.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GPDataType.cs index f3559b0b20..a4f231fa58 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GPDataType.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GPDataType.cs @@ -733,7 +733,24 @@ namespace CSNetwork.GPDataType { public int id; } - + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_object_invisible + { + public int id; //¿ÉÒÔÊÇplayerºÍnpc + public int invisible_degree; //0 ·ÇÒþÉí£» >0 ÒþÉíµÈ¼¶ + }; + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_object_stop_play_action + { + public int id; + }; + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_multiobj_effect + { + public int id; + public int target; + public byte type; + }; [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct cmd_host_attacked { @@ -970,6 +987,40 @@ namespace CSNetwork.GPDataType public int caster; }; [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_object_forbid_be_selected + { + public int id; + public byte b; // 1 ÏÞÖÆ 0 ²»ÏÞÖÆ + }; + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_update_ext_state + { + public int id; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = (int)OBJECT_EXT_STATE_COUNT.OBJECT_EXT_STATE_COUNT)] + public uint[] states; + }; + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_object_root + { + public int id; + public A3DVECTOR3 pos; + }; + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_object_skill_attack_result + { + public int attacker_id; + public int target_id; + public int skill_id; + public int damage; + public int attack_flag; //±ê¼Ç¸Ã¹¥»÷ÊÇ·ñÓй¥»÷ÓÅ»¯·ûºÍ·ÀÓùÓÅ»¯·ûºÍÖØ»÷·¢Éú + public byte speed; //¹¥»÷ËÙ¶È speed * 50 ms + public byte section; + }; + public enum OBJECT_EXT_STATE_COUNT + { + OBJECT_EXT_STATE_COUNT = 6, // Íæ¼Ò/NPC ÉíÉÏ״̬¹âЧ DWORD ¸öÊý + }; + [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct cmd_self_info_00 { public short sLevel; @@ -1365,7 +1416,13 @@ namespace CSNetwork.GPDataType MOVEENV_WATER, MOVEENV_AIR, }; - + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct cmd_out_of_sight_list + { + public uint uCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] + public int[] idList; + } public static class NumberDWORDsPlayerNPC { public const int OBJECT_EXT_STATE_COUNT = 6; // Íæ¼Ò/NPC ÉíÉÏ״̬¹âЧ DWORD ¸öÊý = Number of DWORDs for player/NPC status effects @@ -1390,7 +1447,7 @@ namespace CSNetwork.GPDataType Marshal.FreeHGlobal(ptr); } } - + public static T FromBytes(byte[] data, ref long startIndex) where T : struct { int size = Marshal.SizeOf(); @@ -1842,11 +1899,11 @@ namespace CSNetwork.GPDataType [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct cmd_modify_title_notify { - public ushort id; - public int expiretime; - public char flag; + public ushort id; + public int expiretime; + public char flag; } - + [StructLayout(LayoutKind.Sequential, Pack = 1)] struct cmd_emote_action { @@ -1910,7 +1967,7 @@ namespace CSNetwork.GPDataType public int vigour; public ROLEEXTPROP prop; }; - + [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct cmd_auto_team_set_goal { @@ -1918,10 +1975,10 @@ namespace CSNetwork.GPDataType public int op; public int goal_id; }; - + [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct cmd_object_do_emote - { + { public int id; public ushort emotion; }; diff --git a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs index 65f016b611..cd10ef1146 100644 --- a/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs +++ b/Assets/PerfectWorld/Scripts/Network/CSNetwork/GameSession.cs @@ -746,6 +746,30 @@ namespace CSNetwork case CommandID.OBJECT_EMOTE_RESTORE: EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYERDOEMOTE, MANAGER_INDEX.MAN_PLAYER, -1, pDataBuf, pCmdHeader); break; + case CommandID.OUT_OF_SIGHT_LIST: + { + cmd_out_of_sight_list pCmd5 = default; + pCmd5.uCount = GPDataTypeHelper.FromBytes(pDataBuf); + int offset2 = sizeof(uint); + pCmd5.idList = new int[pCmd5.uCount]; + for (int i = 0; i < pCmd5.uCount; i++) + { + pCmd5.idList[i] = GPDataTypeHelper.FromBytes(pDataBuf, offset2); + offset2 += 4;//sizeof int; + } + + for (uint n = 0; n < pCmd5.uCount; n++) + { + if (ISPLAYERID(pCmd5.idList[n])) + EC_ManMessage.PostMessage(EC_MsgDef.MSG_PM_PLAYEROUTOFVIEW, MANAGER_INDEX.MAN_PLAYER, -1, pCmd5.idList[n], pCmdHeader); + else if (ISNPCID(pCmd5.idList[n])) + EC_ManMessage.PostMessage(EC_MsgDef.MSG_NM_NPCOUTOFVIEW, MANAGER_INDEX.MAN_NPC, 0, pCmd5.idList[n], pCmdHeader); + else if (ISMATTERID(pCmd5.idList[n])) + EC_ManMessage.PostMessage(EC_MsgDef.MSG_MM_MATTEROUTOFVIEW, MANAGER_INDEX.MAN_MATTER, 0, pCmd5.idList[n], pCmdHeader); + } + + break; + } } } diff --git a/Assets/PerfectWorld/Scripts/Players/EC_ElsePlayer.cs b/Assets/PerfectWorld/Scripts/Players/EC_ElsePlayer.cs index 0454ed2e31..f0bffa13bf 100644 --- a/Assets/PerfectWorld/Scripts/Players/EC_ElsePlayer.cs +++ b/Assets/PerfectWorld/Scripts/Players/EC_ElsePlayer.cs @@ -73,8 +73,6 @@ namespace BrewMonster } public void MoveTo(cmd_object_move Cmd) { - BrewMonster.BMLogger.Log("HoangDev : MoveToMoveTo"); - if (Cmd.use_time == 0) return; SetServerPos(Cmd.dest); @@ -86,7 +84,6 @@ namespace BrewMonster // to that position. if (fDist >= MAX_LAGDIST) { - BrewMonster.BMLogger.Log("HoangDev : fDist >= MAX_LAGDIST"); SetPos(Cmd.dest); //m_pEPWorkMan.FinishWork(CECEPWork::WORK_MOVE); return;