Skip to content

Commit

Permalink
code change!
Browse files Browse the repository at this point in the history
  • Loading branch information
ylmbtm committed Apr 29, 2019
1 parent d88cd35 commit 4168483
Show file tree
Hide file tree
Showing 13 changed files with 153 additions and 99 deletions.
15 changes: 8 additions & 7 deletions Proto/proto_raw/Game_Define.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
syntax = "proto3";
enum EObjectType {
OT_NONE = 0; //无类别
OT_PLAYER = 1; //玩家
OT_ROBOT = 2; //机器人
OT_MONSTER= 3; //怪
OT_PET = 4; //宠物
OT_PARTNER= 5; //伙伴
OT_SUMMON = 6; //招唤物
OT_PLAYER = 0; //玩家
OT_NPC = 1; //NPC
OT_MONSTER= 2; //怪
OT_PET = 3; //宠物
OT_MOUNT = 4; //宠物
OT_MACHINE= 5; //机关
OT_PARTNER= 6; //伙伴
OT_SUMMON = 7; //招唤物
}

enum EActionType {
Expand Down
72 changes: 49 additions & 23 deletions Proto/proto_raw/Msg_Game.proto
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,9 @@ message EnterSceneAck {
int32 HpMax = 15;
int32 MpMax = 16;
int32 Speed = 17;
repeated int32 Equips = 18; //武器
repeated SkillItem Skills = 19;//技能
int32 MountID = 18;
repeated int32 Equips = 19; //武器
repeated SkillItem Skills = 20;//技能
}

message AbortCopyReq {
Expand Down Expand Up @@ -246,34 +247,36 @@ message LeaveSceneAck {
}

message TransRoleData {
uint64 RoleID = 1;
string Name = 2;
int32 CarrerID = 3;
int32 ActorID = 4;
int32 Level = 5;
repeated int32 Equips = 6;
repeated int32 Propertys= 7;
repeated SkillItem Skills = 8;
uint64 RoleID = 1;
string Name = 2;
int32 CarrerID = 3;
int32 ActorID = 4;
int32 Level = 5;
int32 MountID = 6;
int32 Robot = 7; //是否是机器人
repeated int32 Equips = 8;
repeated int32 Propertys= 9;
repeated SkillItem Skills = 10;
}

message TransPetData {
uint64 PetGuid = 1;
int32 PetID = 2;
int32 ActorID = 3;
string Name = 4;
int32 Level = 5;
repeated int32 Propertys= 6;
repeated SkillItem Skills = 7;
uint64 PetGuid = 1;
int32 PetID = 2;
int32 ActorID = 3;
string Name = 4;
int32 Level = 5;
repeated int32 Propertys = 6;
repeated SkillItem Skills = 7;
}


message TransPartnerData {
uint64 PartnerGuid = 1;
int32 ParterID = 2;
int32 ActorID = 3;
string Name = 4;
int32 Level = 5;
repeated int32 Propertys= 6;
uint64 PartnerGuid = 1;
int32 PartnerID = 2;
int32 ActorID = 3;
string Name = 4;
int32 Level = 5;
repeated int32 Propertys = 6;
repeated SkillItem Skills = 7;
}

Expand Down Expand Up @@ -478,6 +481,23 @@ message UnsetMountAck {
uint32 RetCode = 1;
}


message SetupPetReq {
uint64 PetGuid = 1;
}

message SetupPetAck {
uint32 RetCode = 1;
}

message UnsetPetReq {
uint64 PetGuid = 1;
}

message UnsetPetAck {
uint32 RetCode = 1;
}

message StoreBuyReq {
int32 StoreType = 1;
int32 StoreID = 2;
Expand Down Expand Up @@ -515,6 +535,12 @@ message UseItemReq {
message UseItemAck {
}

message MsgGetRandomNameReq {
int32 Sex = 1;
}

message MsgGetRandomNameAck {
string Name = 1;
}


80 changes: 37 additions & 43 deletions Proto/proto_raw/Msg_ID.proto
Original file line number Diff line number Diff line change
Expand Up @@ -113,34 +113,39 @@ enum MessageID {
MSG_UNSET_EQUIP_ACK = 2000038;//卸装备
MSG_SETUP_PET_REQ = 2000039;
MSG_SETUP_PET_ACK = 2000040;
MSG_SETUP_PARTNER_REQ = 2000041;
MSG_SETUP_PARTNER_ACK = 2000042;
MSG_UNSET_PARTNER_REQ = 2000043;
MSG_UNSET_PARTNER_ACK = 2000044;
MSG_SETUP_MOUNT_REQ = 2000045;
MSG_SETUP_MOUNT_ACK = 2000046;
MSG_UNSET_MOUNT_REQ = 2000047;
MSG_UNSET_MOUNT_ACK = 2000048;
MSG_USE_ITEM_REQ = 2000049;
MSG_USE_ITEM_ACK = 2000050;
MSG_SETUP_GEM_REQ = 2000051;
MSG_SETUP_GEM_ACK = 2000052;
MSG_UNSET_GEM_REQ = 2000053;
MSG_UNSET_GEM_ACK = 2000054;

MSG_ROLE_RECONNECT_REQ = 2000055;
MSG_ROLE_RECONNECT_ACK = 2000056;
MSG_MAIL_CHANGE_NTY = 2000057;
MSG_TASK_CHANGE_NTY = 2000058;

MSG_BROAD_MESSAGE_NOTIFY = 2000060;
MSG_GASVR_REGTO_PROXY_REQ = 2000061;
MSG_GASVR_REGTO_PROXY_ACK = 2000062;

MSG_STORE_BUY_REQ = 2000063;
MSG_STORE_BUY_ACK = 2000064;

MSG_GEM_CHANGE_NTY = 2000065;
MSG_UNSET_PET_REQ = 2000041;
MSG_UNSET_PET_ACK = 2000042;
MSG_SETUP_PARTNER_REQ = 2000043;
MSG_SETUP_PARTNER_ACK = 2000044;
MSG_UNSET_PARTNER_REQ = 2000045;
MSG_UNSET_PARTNER_ACK = 2000046;
MSG_SETUP_MOUNT_REQ = 2000047;
MSG_SETUP_MOUNT_ACK = 2000048;
MSG_UNSET_MOUNT_REQ = 2000049;
MSG_UNSET_MOUNT_ACK = 2000050;
MSG_USE_ITEM_REQ = 2000051;
MSG_USE_ITEM_ACK = 2000052;
MSG_SETUP_GEM_REQ = 2000053;
MSG_SETUP_GEM_ACK = 2000054;
MSG_UNSET_GEM_REQ = 2000055;
MSG_UNSET_GEM_ACK = 2000056;

MSG_ROLE_RECONNECT_REQ = 2000057;
MSG_ROLE_RECONNECT_ACK = 2000058;
MSG_MAIL_CHANGE_NTY = 2000059;
MSG_TASK_CHANGE_NTY = 2000060;

MSG_BROAD_MESSAGE_NOTIFY = 2000061;
MSG_GASVR_REGTO_PROXY_REQ = 2000062;
MSG_GASVR_REGTO_PROXY_ACK = 2000063;

MSG_STORE_BUY_REQ = 2000064;
MSG_STORE_BUY_ACK = 2000065;

MSG_GEM_CHANGE_NTY = 2000066;

MSG_RANDOM_NAME_REQ = 2000067;
MSG_RANDOM_NAME_ACK = 2000068;



Expand Down Expand Up @@ -197,8 +202,11 @@ enum MessageID {
MSG_SWITCH_MOUNT_REQ = 3000034;
MSG_SWITCH_MOUNT_ACK = 3000035;

MSG_SCENEOBJ_CHAGE_NTF = 3000036;
MSG_PLAYER_CHAGE_NTF = 3000036;
MSG_ACTOR_HITEFFECT_NTF = 3000037;

MSG_MOUNT_RIDING_REQ = 3000038;
MSG_MOUNT_RIDING_ACK = 3000039;

MSG_SCENESVR_MSGID_END = 3999999;
////////////////////////////////////////////////////////////////////
Expand All @@ -209,17 +217,12 @@ enum MessageID {
MSG_ACK_ADVANCE_EQUIP = 1118;//进阶装备
MSG_REQ_UPSTAR_EQUIP = 1119;//升星装备
MSG_ACK_UPSTAR_EQUIP = 1120;//升星装备
MSG_REQ_STRENGTHEN_GEM = 1121;//强化宝石
MSG_ACK_STRENGTHEN_GEM = 1122;//强化宝石

MSG_REQ_ONEKEYTODRESSGEM = 1151;//镶嵌宝石
MSG_ACK_ONEKEYTODRESSGEM = 1152;//镶嵌宝石
MSG_REQ_ONEKEYTOUNLOADGEM = 1153;//镶嵌宝石
MSG_ACK_ONEKEYTOUNLOADGEM = 1154;//镶嵌宝石

MSG_REQ_SETMOUNT = 1301;//坐骑上阵
MSG_ACK_SETMOUNT = 1302;//坐骑上阵

MSG_REQ_CHARGE_RELICS = 1401;//神器充能
MSG_ACK_CHARGE_RELICS = 1402;//神器充能
MSG_REQ_UPGRADE_RELICS = 1403;//神器升级
Expand All @@ -229,15 +232,9 @@ enum MessageID {
MSG_REQ_UNLOAD_RELICS = 1407;//神器卸下
MSG_ACK_UNLOAD_RELICS = 1408;//神器卸下

MSG_REQ_BUY_STORE = 1501;//购买商店物品
MSG_ACK_BUY_STORE = 1502;//购买商店物品

MSG_REQ_UPGRADE_PET = 1601;//更换宠物
MSG_ACK_UPGRADE_PET = 1602;//更换宠物

MSG_REQ_BATTLE_PET = 1603;//进阶宠物
MSG_ACK_BATTLE_PET = 1604;//进阶宠物

MSG_REQ_UNLOAD_PET = 1605;//升级宠物
MSG_ACK_UNLOAD_PET = 1606;//升级宠物

Expand All @@ -249,8 +246,5 @@ enum MessageID {

MSG_REQ_UPGRADE_PARTNER = 1611;//收回伙伴
MSG_ACK_UPGRADE_PARTNER = 1612;//收回伙伴

MSG_REQ_SUBMIT_TASK = 1613;//提交日常任务
MSG_ACK_SUBMIT_TASK = 1614;//提交日常任务
}

13 changes: 11 additions & 2 deletions Proto/proto_raw/Msg_Move.proto
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ message NewItem {
int32 HpMax = 20;
int32 MpMax = 21;
int32 Speed = 22;
repeated int32 Equips = 23; //装备
repeated SkillItem Skills= 24; //普通技能
repeated int32 Equips = 23; //装备
repeated SkillItem Skills= 24; //普通技能
}

message ObjectNewNty {
Expand Down Expand Up @@ -159,3 +159,12 @@ message HeartBeatAck {
message ObjectDieNotify {
uint64 ObjectGuid = 1;
}


message Msg_RidingMountReq {
uint64 ObjectGuid = 1;
}

message Msg_RidingMountAck {
uint32 RetCode = 1; //是否释放成功, 失败原因。
}
3 changes: 2 additions & 1 deletion Server/Client/SmartClient/SmartClient/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
//#define ASSERT_FAIELD (ASSERT(false))

#define ASSERT_FAIELD (assert(false))

#ifndef ASSERT
#define ASSERT assert
#endif

#pragma comment(lib,"ws2_32")
#pragma comment(lib, "Mswsock")
Expand Down
20 changes: 20 additions & 0 deletions Server/Src/GameServer/GameStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,26 @@ typedef struct St_ObjectStatus
};
} St_ObjectStatus;

typedef struct St_ChangeStatus
{
union
{
UINT32 dwValue;
struct
{
UINT32 bBase : 1; // 基础数据,属性, 行动状态, 坐标, 朝向
UINT32 bDead : 1; // 是否死亡
UINT32 bEquip : 1; // 装备
UINT32 bActor : 1; // 角色
UINT32 bAction : 1; // 行动状态
UINT32 bBuff : 1; // BUFF
UINT32 bLevel : 1; // 等级
UINT32 bControl : 1; // 控制权
UINT32 bCamp : 1; // 阵营
UINT32 bMount : 1; // 坐骑
};
};
} St_ChangeStatus;


#endif //__GAME_STRUCT_H__
4 changes: 2 additions & 2 deletions Server/Src/ServerData/PetData.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct PetDataObject : public ShareObject
BOOL Create(IDBInterface* pDB)
{
static CDBStoredProcedure csp("REPLACE INTO pet (guid, roleid, petid, isuse, strengthlvl, refinelvl, starlvl) \
VALUES(?,?,?,?,?,?,?,?);");
VALUES(?,?,?,?,?,?,?);");
csp.set_uint64(0, m_uGuid);
csp.set_uint64(1, m_uRoleID);
csp.set_uint32(2, m_PetID);
Expand All @@ -45,7 +45,7 @@ struct PetDataObject : public ShareObject
BOOL Update(IDBInterface* pDB)
{
static CDBStoredProcedure csp("REPLACE INTO pet (guid, roleid, petid, isuse, strengthlvl, refinelvl, starlvl) \
VALUES(?,?,?,?,?,?,?,?);");
VALUES(?,?,?,?,?,?,?);");
csp.set_uint64(0, m_uGuid);
csp.set_uint64(1, m_uRoleID);
csp.set_uint32(2, m_PetID);
Expand Down
1 change: 1 addition & 0 deletions Server/Src/ServerData/ServerStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ enum EChangeType
ECT_MOUNT = 2,//坐骑改变
ECT_LEVEL = 3,//等级
ECT_PARTNER = 4,//伙伴
ECT_PET = 5,//宠物
};


Expand Down
Loading

0 comments on commit 4168483

Please sign in to comment.