1
This commit is contained in:
parent
3a0f9795c0
commit
8107accaaf
@ -91,6 +91,7 @@ void HandlerMgr::RegisterNetMsgHandlers()
|
||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMWatchWar);
|
||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMLeave);
|
||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMRevive);
|
||||
RegisterNetMsgHandler(&ggmsghandler, &Player::_CMCancelRevive);
|
||||
}
|
||||
|
||||
void HandlerMgr::ProcGMMsg(unsigned long saddr, int sockhandle,
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "framework/cpp/utils.h"
|
||||
#include "framework/cpp/httpclientpool.h"
|
||||
|
||||
const int kReviveTimeAdd = 6;
|
||||
const int kReviveTimeAdd = 8;
|
||||
|
||||
Human::Human():Entity()
|
||||
{
|
||||
|
@ -215,6 +215,7 @@ class Human : public Entity
|
||||
int SkinId();
|
||||
int SkinLv();
|
||||
void CheckSkinTank();
|
||||
void OnDie();
|
||||
|
||||
protected:
|
||||
void _UpdateMove(int speed);
|
||||
@ -228,7 +229,6 @@ private:
|
||||
void FillSMGameOver(cs::SMGameOver& msg);
|
||||
void SendBattleReport();
|
||||
void FindLocationWithTarget(Entity* target);
|
||||
void OnDie();
|
||||
void Revive();
|
||||
|
||||
protected:
|
||||
|
@ -1101,3 +1101,13 @@ void Player::_CMRevive(f8::MsgHdr& hdr, const cs::CMRevive& msg)
|
||||
revive_timer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void Player::_CMCancelRevive(f8::MsgHdr& hdr, const cs::CMCancelRevive& msg)
|
||||
{
|
||||
if (dead && !real_dead) {
|
||||
dead = true;
|
||||
real_dead = true;
|
||||
downed = false;
|
||||
OnDie();
|
||||
}
|
||||
}
|
||||
|
@ -89,5 +89,6 @@ class Player : public Human
|
||||
void _CMWatchWar(f8::MsgHdr& hdr, const cs::CMWatchWar& msg);
|
||||
void _CMLeave(f8::MsgHdr& hdr, const cs::CMLeave& msg);
|
||||
void _CMRevive(f8::MsgHdr& hdr, const cs::CMRevive& msg);
|
||||
void _CMCancelRevive(f8::MsgHdr& hdr, const cs::CMCancelRevive& msg);
|
||||
|
||||
};
|
||||
|
@ -13,6 +13,7 @@ enum CMMessageId_e
|
||||
_CMWatchWar = 208;
|
||||
_CMLeave = 209;
|
||||
_CMRevive = 210;
|
||||
_CMCancelRevive = 211;
|
||||
}
|
||||
|
||||
enum SMMessageId_e
|
||||
|
@ -736,6 +736,12 @@ message CMRevive
|
||||
|
||||
}
|
||||
|
||||
//取消复活
|
||||
message CMCancelRevive
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
//endcmmsg
|
||||
|
||||
//观战error_code == 0 时关闭结算界面,回到战斗界面
|
||||
|
Loading…
x
Reference in New Issue
Block a user