using ET;
using FairyGUI;
using System;
using System.Collections.Generic;
namespace ET
{
public class TeamHelper
{
///
/// 邀请组队
///
///
public static async ETVoid InviteTeam(Scene zoneScene)
{
M2C_InviteTeam response = await zoneScene.GetComponent().Call(new C2M_InviteTeam() { TargetId = zoneScene.GetComponent().SelectUnitId });
if (!response.Message.IsNullOrEmpty())
{
Game.EventSystem.Publish(new ET.EventType.ShowTipUI
{
tip =response.Message
}).Coroutine();
}
}
///
/// 申请入队
///
///
public static async ETVoid RequestTeam(Scene zoneScene)
{
M2C_RequestTeam response = await zoneScene.GetComponent().Call(new C2M_RequestTeam() { TargetId = zoneScene.GetComponent().SelectUnitId });
if (!response.Message.IsNullOrEmpty())
{
Game.EventSystem.Publish(new ET.EventType.ShowTipUI
{
tip = response.Message
}).Coroutine();
}
}
public static async ETVoid TransferTeamLeader(Scene zoneScene,long id)
{
M2C_TransferTeamLeader response = await zoneScene.GetComponent().Call(new C2M_TransferTeamLeader() {UnitId = id });
if (!response.Message.IsNullOrEmpty())
{
Game.EventSystem.Publish(new ET.EventType.ShowTipUI
{
tip = response.Message
}).Coroutine();
}
}
public static async ETVoid QuitTeam(Scene zoneScene)
{
M2C_QuitTeam response = await zoneScene.GetComponent().Call(new C2M_QuitTeam() { });
if (!response.Message.IsNullOrEmpty())
{
Game.EventSystem.Publish(new ET.EventType.ShowTipUI
{
tip = response.Message
}).Coroutine();
}
}
public static async ETVoid KickoutTeam(Scene zoneScene,long id)
{
M2C_KickoutTeam response = await zoneScene.GetComponent().Call(new C2M_KickoutTeam() { TargetId = id });
if (!response.Message.IsNullOrEmpty())
{
Game.EventSystem.Publish(new ET.EventType.ShowTipUI
{
tip = response.Message
}).Coroutine();
}
}
}
}