Свернуть ↑
/**
* This file is part of HighBNS Emulator
*
* HighBNS Emulator is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* HighBNS Emulator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with HighBNS Emulator. If not, see <http://www.gnu.org/licenses/>.
*/
using HighBNS.Main.Network.Main.Push;
using HighBNS.Main.Network.Main.Receive;
using HighBNS.Referenced;
using HighBNS.Referenced.Network;
namespace HighBNS.Main.Network{
public class ClientMessageHolder : IMessageHolder<byte[], ClientConnection, short>{
public override void MakeContracts(){
base.MakeContracts();
Contract(0x0001, typeof(SM_APPEAR_OBJECTS_LIST)); // 270 KR.
Contract(0x0002, typeof(SM_APPEAR_OBJECTS_RENDER)); // 270 KR.
Contract(0x0003, typeof(SM_GAME_OBJECTS_LIST));// 270 KR.
Contract(0x0004, typeof(SM_GAME_OBJECTS_DATA));// 270 KR.
Contract(0x0005, typeof(SM_GAME_OBJECTS_DELETE));// 270 KR.
Contract(0x0006, typeof(SM_BROADCAST_ATTRIBUTES));// 270 KR.
Contract(0x0007, typeof(SM_PLAYER_ATTRIBUTES));// 270 KR.
Contract(0x0008, new CM_KEY_EXCHANGE());// 270 KR.
Contract(0x0009, typeof(SM_KEY_EXCHANGE));// 270 KR.
Contract(0x000A, new CM_KEEP_ALIVE());// 270 KR.
Contract(0x000B, typeof(SM_KEEP_ALIVE));// 270 KR.
Contract(0x000C, new CM_C());// 270 KR.
Contract(0x0011, new CM_ENTER_WORLD());// 270 KR.
Contract(0x0012, typeof(SM_CLIENT_ACCEPTED));// 270 KR.
Contract(0x0019, new CM_START());// 270 KR.
Contract(0x001A, typeof(SM_CHARACTER_INFO));// 270 KR.
Contract(0x0023, typeof(SM_CHANGE_MAP));// 270 KR.
Contract(0x0024, new CM_MAP_READY());// 270 KR.
Contract(0x0025, typeof(SM_MAP_ACTIVATED));// 270 KR.
Contract(0x002D, new CM_CHAT());// 270 KR.
Contract(0x002E, typeof(SM_CHAT));// 270 KR.
Contract(0x0037, new CM_MOVE());// 270 KR.
Contract(0x0039, new CM_TURN()); // 270 KR.
Contract(0x0387, new CM_QUEST_UPDATE_REQUIRED()); // 270 KR.
Contract(0x0320, new CM_STATIC_USE_END());//270 KR.
Contract(0x0321, typeof(SM_STATIC_ITEM_END));//270 KR.
Contract(0x004B, typeof(SM_QUESTS)); //270 KR.
Contract(0x0394, typeof(SM_FINISH_QUEST)); //270 KR.
Contract(0x0391, typeof (SM_NEXT_QUEST)); // 270 KR.
Contract(0x004E, typeof(SM_Q_UNDEFINED)); // 270 KR.
Contract(0x0392, typeof(SM_QUEST_UPDATE)); // 270 KR.
Contract(0x0389, new CM_STATIC_UPDATEREQUEST()); //270 KR.
Contract(0x02DE, new CM_QUEST_TALK()); //270 KR.
Contract(0x02DF, typeof(SM_QUEST_TALK)); //270 KR.
Contract(0x031A, new CM_STATIC_ITEMS()); // 270 KR
Contract(0x031B, typeof(SM_STATIC_ITEMS)); // 270 KR
Contract(0x02FF, new CM_USE_STATICOBJECT()); //270 KR.
Contract(0x0052, new CM_50());//270 KR
Contract(0x0053, typeof(SM_51)); //270 KR
Contract(0x0058, new CM_56()); //270 KR
Contract(0x0059, typeof(SM_57)); //270 KR
Contract(0x005E, new CM_5C());//270 KR.
Contract(0x005F, typeof(SM_5D));//270 KR.
Contract(0x0063, new CM_61()); //270 KR.
Contract(0x0064, typeof(SM_62));//270 KR
Contract(0x00CF, new CM_LEVEL_LEFT()); //270 KR.
Contract(0x00FA, typeof(SM_F8)); //270 KR.
Contract(0x00FD, typeof(SM_FB));//270 KR.
Contract(0x010E, new CM_10C()); //270 KR.
Contract(0x010F, typeof(SM_10D)); //270 KR.
Contract(0x0114, new CM_112()); // 270 KR.
Contract(0x0115, typeof(SM_113)); //270 KR.
Contract(0x011A, new CM_118()); //270 KR.
Contract(0x011B, typeof(SM_119)); //270 KR.
Contract(0x0127, new CM_125()); //270 KR.
Contract(0x0128, typeof (SM_126)); //270 KR.
Contract(0x0148, typeof(SM_SERVERTIME)); //270 KR.
Contract(0x013B, new CM_ERROR_LOG()); // 270 KR.
Contract(0x013C, typeof(SM_ERROR_LOG_ANSWER)); //270 KR.
Contract(0x0149, new CM_147()); //270 KR.
Contract(0x014B, typeof (SM_149)); //270 KR.
Contract(0x0240, new CM_21D()); //270 KR.
Contract(0x0241, typeof (SM_21E)); //270KR.
Contract(0x0248, new CM_225()); // 270 KR.
Contract(0x0249, typeof(SM_226)); // 270 KR.
Contract(0x0251, new CM_22E()); // 270 KR.
Contract(0x0252, typeof(SM_22F));// 270KR
Contract(0x02A5, typeof (SM_282)); //270KR
Contract(0x029E, typeof(SM_27B));// 270KR
Contract(0x0332, new CM_STORAGES_INIT()); //270KR
Contract(0x0333, typeof(SM_STORAGE)); //270KR
Contract(0x0335, new CM_REMOVE_ITEM()); //270KR
Contract(0x0337, new CM_MOVE_ITEM()); //270KR
Contract(0x0346, new CM_EQUIP()); //270KR
Contract(0x034B, new CM_UNEQUIP()); //270KR
Contract(0x0339, new CM_ARRANGE_STORAGE()); //270KR
Contract(0x033A, typeof(SM_ARRANGE_STORAGE)); //270KR
Contract(0x03A1, new CM_36D()); //270KR
Contract(0x03A2, typeof(SM_36E)); //270KR
Logger.Info("(Client) Made Contracts (Receive): {0}", r_ReceivePackage.Count);
Logger.Info("(Client) Made Contracts (Push): {0}", r_PushPackage.Count);
}
public override void OnUndefinedPacket(short Opcode, byte[] Data){
Logger.Warn("Undefined Packet: 0x{0:X2} - Length:{1}", Opcode, Data.Length);
}
}
}
Code: C++