45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using ProtoBuf;
|
|
using Thousandto.Plugins.Common;
|
|
using Thousandto.Code.Center;
|
|
using Thousandto.Code.Global;
|
|
|
|
namespace Thousandto.Code.Logic.Network
|
|
{
|
|
|
|
/// <summary>
|
|
/// 实现消息的回调方法 -- Buf处理
|
|
/// </summary>
|
|
public partial class HandleMsgResult : IHandleMsgResult
|
|
{
|
|
//获取Buf列表
|
|
public void GS2U_ResBuffs( MSG_Buff.ResBuffs result )
|
|
{
|
|
LocalPlayer lp = GameCenter.GameSceneSystem.GetLocalPlayer();
|
|
if (lp == null)
|
|
return;
|
|
GameCenter.BuffSystem.ResBuffList(lp.ID, result.buffs);
|
|
}
|
|
|
|
//增加一个Buf
|
|
public void GS2U_ResAddBuff( MSG_Buff.ResAddBuff result )
|
|
{
|
|
GameCenter.BuffSystem.ResAddBuff(result.ownId, result.buff);
|
|
}
|
|
//移除一个Buf
|
|
public void GS2U_ResRemoveBuff( MSG_Buff.ResRemoveBuff result )
|
|
{
|
|
GameCenter.BuffSystem.ResDeleteBuff(result.ownId, result.id);
|
|
}
|
|
//更新一个buf
|
|
public void GS2U_ResUpdateBuff( MSG_Buff.ResUpdateBuff result )
|
|
{
|
|
GameCenter.BuffSystem.ResUpdateBuff(result);
|
|
}
|
|
|
|
public void GS2U_ResHpAddOrDec(MSG_Buff.ResHpAddOrDec result)
|
|
{
|
|
GameCenter.PushFixEvent((int)LogicEventDefine.EID_EVENT_HUD_POPUP_BUFFDAMAGE, result);
|
|
}
|
|
}
|
|
}
|