public static void Dead(int last) { var cg = CGPlayerCmd.CreateBuilder(); cg.Cmd = "Dead"; var dinfo = DamageInfo.CreateBuilder(); dinfo.Attacker = last; dinfo.Enemy = ObjectManager.objectManager.GetMyAttr().GetNetView().GetServerID(); cg.DamageInfo = dinfo.Build(); WorldManager.worldManager.GetActive().BroadcastMsg(cg); }
public static void FastDamage(int attackerId, int enemyId, int damage, bool isCritical) { var cg = CGPlayerCmd.CreateBuilder(); var dinfo = DamageInfo.CreateBuilder(); dinfo.Attacker = attackerId; dinfo.Enemy = enemyId; dinfo.Damage = damage; dinfo.IsCritical = isCritical; cg.DamageInfo = dinfo.Build(); cg.Cmd = "Damage"; WorldManager.worldManager.GetActive().BroadcastMsg(cg); }