public void AddBuff(BattleAction_AddBuff data, bool isServerData) { if (data.targetId != this.owner.ID) { return; } this.owner.GetBuffManager().AddBuff(data.buffId, data.dueTime); }
public static void SendAddBuff(long casterID, long targetID, int buffID, int buffTime) { BattleAction_AddBuff battleAction_AddBuff = new BattleAction_AddBuff(); battleAction_AddBuff.casterId = casterID; battleAction_AddBuff.targetId = targetID; battleAction_AddBuff.buffId = buffID; battleAction_AddBuff.dueTime = buffTime; EventDispatcher.Broadcast <BattleAction_AddBuff, bool>(BattleActionEvent.AddBuff, battleAction_AddBuff, false); }