本文整理汇总了C#中Aura.World.World.MabiCreature类的典型用法代码示例。如果您正苦于以下问题:C# MabiCreature类的具体用法?C# MabiCreature怎么用?C# MabiCreature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MabiCreature类属于Aura.World.World命名空间,在下文中一共展示了MabiCreature类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: AcquireStat
public static MabiPacket AcquireStat(MabiCreature creature, string statName, double amount)
{
var p = new MabiPacket(Op.AcquireInfo, creature.Id);
p.PutString("<xml type='{0}' value='{1}' simple='true' onlyLog='false' />", statName, (uint)amount);
p.PutInt(3000);
return p;
}
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:7,代码来源:PacketCreator.cs
示例2: Ready
public override SkillResults Ready(MabiCreature creature, MabiSkill skill)
{
SkillHelper.FillStack(creature, skill);
Send.SkillReady(creature.Client, creature, skill.Id);
return SkillResults.Okay;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:WindmillHandler.cs
示例3: GuildDonateR
/// <summary>
/// Sends GuildDonateR to creature's client.
/// </summary>
public static void GuildDonateR(MabiCreature creature, bool success)
{
var packet = new MabiPacket(Op.GuildDonateR, creature.Id);
packet.PutByte(success);
creature.Client.Send(packet);
}
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:10,代码来源:Send.Guild.cs
示例4: ConvertGpConfirmR
/// <summary>
/// Sends ConvertGpConfirmR to creature's client.
/// </summary>
public static void ConvertGpConfirmR(MabiCreature creature, bool success)
{
var packet = new MabiPacket(Op.ConvertGpConfirmR, creature.Id);
packet.PutByte(success);
creature.Client.Send(packet);
}
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:10,代码来源:Send.Guild.cs
示例5: AcquireAp
public static MabiPacket AcquireAp(MabiCreature creature, uint amount)
{
var p = new MabiPacket(Op.AcquireInfo, creature.Id);
p.PutString("<xml type='ap' value='{0}' simple='true' onlyLog='false' />", amount);
p.PutInt(3000);
return p;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:PacketCreator.cs
示例6: Stop
public override SkillResults Stop(MabiCreature creature, MabiSkill skill, MabiTags tags)
{
creature.State &= ~CreatureStates.SitDown;
Send.StandUp(creature);
if (creature.Temp.SittingProp != null)
{
// Effect
if (creature.Temp.CurrentChair.Effect != 0)
Send.Effect(Effect.CherryBlossoms, creature, false);
// Update chair
creature.Temp.SittingProp.ExtraData = string.Format("<xml OWNER='0' SITCHAR='0'/>");
Send.PropUpdate(creature.Temp.SittingProp);
Send.AssignChair(creature, 0, 0);
// Remove chair in 1s
creature.Temp.SittingProp.DisappearTime = DateTime.Now.AddSeconds(1);
creature.Temp.SittingProp = null;
}
return SkillResults.Okay;
}
开发者ID:pjm0616,项目名称:aura,代码行数:25,代码来源:RestHandler.cs
示例7: GetIceSpearLOSChain
public List<MabiCreature> GetIceSpearLOSChain(MabiCreature attacker, MabiCreature target, uint range)
{
var aPos = attacker.GetPosition();
var tPos = target.GetPosition();
var minX = Math.Min(aPos.X, tPos.X) - range;
var maxX = Math.Max(aPos.X, tPos.X) + range;
var m = ((double)tPos.Y - aPos.Y) / ((double)tPos.X - aPos.X);
var bL = (double)aPos.Y - aPos.X * m - (range / 2);
var bH = bL + range;
var targets = WorldManager.Instance.GetCreaturesInRange(attacker, maxX - minX); // Rough filter
targets = targets.FindAll((c) =>
{
var pos = c.GetPosition();
return !c.IsDead && c.IsAttackableBy(attacker) && (minX < pos.X && pos.X < maxX) && ((m * pos.X + bL) < pos.Y && pos.Y < (m * pos.X + bH));
});
if (!targets.Contains(target))
targets.Add(target);
return targets;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:25,代码来源:IcespearHandler.cs
示例8: AcquireExp
public static MabiPacket AcquireExp(MabiCreature creature, uint amount)
{
var p = new MabiPacket(Op.AcquireInfo, creature.Id);
p.PutString("<xml type='exp' value='{0}'/>", amount);
p.PutInt(3000);
return p;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:PacketCreator.cs
示例9: AddPvPInfo
private static void AddPvPInfo(this MabiPacket packet, MabiCreature creature)
{
var arena = creature.ArenaPvPManager != null;
packet.PutByte(arena); // ArenaPvP
packet.PutInt(arena ? creature.ArenaPvPManager.GetTeam(creature) : (uint)0);
packet.PutByte(creature.TransPvPEnabled);
packet.PutInt(arena ? creature.ArenaPvPManager.GetStars(creature) : 0);
packet.PutByte(creature.EvGEnabled);
packet.PutByte(creature.EvGSupportRace);
packet.PutByte(1); // IsPvPMode
packet.PutLong(creature.PvPWins);
packet.PutLong(creature.PvPLosses);
packet.PutInt(0);// PenaltyPoints
packet.PutByte(1); // unk
// [170300] ?
{
packet.PutByte(0);
packet.PutInt(0);
packet.PutInt(0);
packet.PutInt(0);
packet.PutInt(0);
}
}
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:25,代码来源:Send.PvP.cs
示例10: CombatTargetSet
public static void CombatTargetSet(MabiCreature creature, MabiCreature target)
{
var packet = new MabiPacket(Op.CombatTargetSet, creature.Id);
packet.PutLong(target != null ? target.Id : 0);
WorldManager.Instance.Broadcast(packet, SendTargets.Range, creature);
}
开发者ID:pjm0616,项目名称:aura,代码行数:7,代码来源:Send.World.cs
示例11: PvPInformation
/// <summary>
/// Broadcasts pvp information for creature in region.
/// </summary>
/// <param name="creature"></param>
/// <param name="region"></param>
public static void PvPInformation(MabiCreature creature, uint region)
{
var packet = new MabiPacket(Op.PvPInformation, creature.Id);
packet.AddPvPInfo(creature);
WorldManager.Instance.BroadcastRegion(packet, region);
}
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:12,代码来源:Send.PvP.cs
示例12: QuestUpdate
public static void QuestUpdate(MabiCreature creature, MabiQuest quest)
{
var packet = new MabiPacket(Op.QuestUpdate, creature.Id);
packet.AddQuestProgress(quest);
creature.Client.Send(packet);
}
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:7,代码来源:Send.Quest.cs
示例13: SkillCancel
/// <summary>
/// Simple skill cancel.
/// </summary>
/// <param name="client"></param>
/// <param name="creature"></param>
public static void SkillCancel(Client client, MabiCreature creature)
{
var packet = new MabiPacket(Op.SkillCancel, creature.Id);
packet.PutBytes(0, 1);
client.Send(packet);
}
开发者ID:Fuhhue,项目名称:aura_legacy,代码行数:12,代码来源:Send.Skill.cs
示例14: Stop
public override SkillResults Stop(MabiCreature creature, MabiSkill skill)
{
creature.Conditions.A &= ~CreatureConditionA.ManaShield;
Send.StatusEffectUpdate(creature);
return SkillResults.Okay;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:ManaShieldHandler.cs
示例15: AcquireItem
public static MabiPacket AcquireItem(MabiCreature creature, uint cls, uint amount)
{
var p = new MabiPacket(Op.AcquireInfo, creature.Id);
p.PutString("<xml type='item' classid='{0}' value='{1}'/>", cls, amount);
p.PutInt(3000);
return p;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:PacketCreator.cs
示例16: Prepare
public override SkillResults Prepare(MabiCreature creature, MabiSkill skill, MabiPacket packet, uint castTime)
{
Send.Flash(creature);
Send.SkillPrepare(creature.Client, creature, skill.Id, castTime);
return SkillResults.Okay;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:7,代码来源:MagnumShotHandler.cs
示例17: Use
public override SkillResults Use(MabiCreature creature, MabiSkill skill, MabiPacket packet)
{
var targetId = packet.GetLong();
var target = WorldManager.Instance.GetCreatureById(targetId);
if (target == null)
return SkillResults.InvalidTarget;
if (creature != target && !WorldManager.InRange(creature, target, 1000))
return SkillResults.OutOfRange;
// Reduce Stamina equal to healing amount if a player
// is using the skill on himself.
if (creature == target && creature is MabiPC)
{
var amount = Math.Min(skill.RankInfo.Var1, creature.LifeInjured - creature.Life);
if (creature.Stamina < amount)
return SkillResults.InsufficientStamina;
creature.Stamina -= amount;
}
target.Life += skill.RankInfo.Var1;
WorldManager.Instance.CreatureStatsUpdate(target);
SkillHelper.DecStack(creature, skill);
WorldManager.Instance.Broadcast(new MabiPacket(Op.Effect, creature.Id).PutInt(Effect.UseMagic).PutString("healing").PutLong(target.Id), SendTargets.Range, creature);
WorldManager.Instance.Broadcast(new MabiPacket(Op.Effect, creature.Id).PutInt(Effect.StackUpdate).PutString("healing_stack").PutBytes(creature.ActiveSkillStacks, 0), SendTargets.Range, creature);
SkillHelper.GiveSkillExp(creature, skill, 20);
Send.SkillUse(creature.Client, creature, skill.Id, targetId);
return SkillResults.Okay;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:35,代码来源:HealHandler.cs
示例18: ItemUpdate
public static void ItemUpdate(Client client, MabiCreature creature, MabiItem item)
{
var packet = new MabiPacket(Op.ItemUpdate, creature.Id);
packet.AddItemInfo(item, ItemPacketType.Private);
client.Send(packet);
}
开发者ID:pjm0616,项目名称:aura,代码行数:7,代码来源:Send.Item.cs
示例19: UseCombat
public override SkillResults UseCombat(MabiCreature attacker, ulong targetId, MabiSkill skill)
{
var target = WorldManager.Instance.GetCreatureById(targetId);
if (target == null)
return SkillResults.InvalidTarget;
if (attacker.Magazine == null || attacker.Magazine.Count < 1)
return SkillResults.Failure;
var rnd = RandomProvider.Get();
attacker.StopMove();
var factory = new CombatFactory();
factory.SetAttackerAction(attacker, CombatActionType.RangeHit, skill.Id, targetId);
factory.SetAttackerOptions(AttackerOptions.Result);
factory.SetAttackerStun(AfterUseStun);
bool hit = false;
if (attacker.GetAimPercent(1) > rnd.NextDouble())
{
target.StopMove();
factory.AddTargetAction(target, CombatActionType.TakeHit);
factory.SetTargetOptions(TargetOptions.Result);
factory.SetTargetStun(StunTime);
hit = true;
}
else
{
factory.AddTargetAction(target, CombatActionType.None);
}
Send.SkillUse(attacker.Client, attacker, skill.Id, AfterUseStun, 1);
SkillHelper.ClearStack(attacker, skill);
attacker.Client.Send(new MabiPacket(Op.CombatTargetSet, attacker.Id).PutLong(0));
factory.ExecuteDamage(new System.Func<MabiCreature, MabiCreature, float>((a, t) =>
{
var damage = attacker.GetRndRangeDamage();
damage *= skill.RankInfo.Var1 / 100f;
return damage;
}));
factory.ExecuteStun();
factory.ExecuteKnockback(CombatHelper.MaxKnockBack);
WorldManager.Instance.HandleCombatActionPack(factory.GetCap());
if (hit)
CombatHelper.SetAggro(attacker, target);
SkillHelper.GiveSkillExp(attacker, skill, 20);
return SkillResults.Okay;
}
开发者ID:nvrlcky,项目名称:aura,代码行数:59,代码来源:MagnumShotHandler.cs
示例20: MabiParty
public MabiParty(MabiCreature leader)
{
_id = NewPartyId;
Members.Add(leader);
_leader = leader;
_leader.PartyNumber = 1;
}
开发者ID:hzdlive,项目名称:aura,代码行数:8,代码来源:MabiParty.cs
注:本文中的Aura.World.World.MabiCreature类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论