本文整理匯總了C#中Server.Network.PacketHitList.AddHitList方法的典型用法代碼示例。如果您正苦於以下問題:C# PacketHitList.AddHitList方法的具體用法?C# PacketHitList.AddHitList怎麽用?C# PacketHitList.AddHitList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Network.PacketHitList
的用法示例。
在下文中一共展示了PacketHitList.AddHitList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: FinalizeAction
public static void FinalizeAction(BattleSetup setup, PacketHitList parent)
{
Scripting.ScriptManager.InvokeSub("AfterActionTaken", setup);
if (setup.Attacker.CharacterType == Enums.CharacterType.Recruit) {
if (setup.AttackerMap.MapType == Enums.MapType.Standard) {
setup.ExpGained /= 2;
}
if (setup.ExpGained > 0) {
if (((Recruit)setup.Attacker).Owner.Player.PartyID == null) {
if (!(setup.Attacker.Level == Exp.ExpManager.Exp.MaxLevels)) {
Scripting.ScriptManager.InvokeSub("PlayerEXP", setup.packetStack, ((Recruit)setup.Attacker).Owner, setup.ExpGained);
CheckPlayerLevelUp(setup.PacketStack, ((Recruit)setup.Attacker).Owner);
}
} else {
Party party = PartyManager.FindPlayerParty(((Recruit)setup.Attacker).Owner);
if (party != null) {
party.HandoutExp(((Recruit)setup.Attacker).Owner, setup.ExpGained, setup.PacketStack);
}
}
}
//setup.PacketStack.AddPacket(((Recruit)setup.Attacker).Owner, PacketBuilder.CreateBattleDivider());
}
// Disable caching and build the hitlist to allow for post-processing
setup.PacketStack.CachingEnabled = false;
for (int i = 0; i < setup.PacketStack.HitList.Count; i++) {
if (setup.PacketStack.HitList.ValueByIndex(i).ContainsPacket("battlemsg") && parent == null) {
setup.PacketStack.AddPacket(setup.PacketStack.HitList.KeyByIndex(i), PacketBuilder.CreateBattleDivider());
}
}
if (parent != null) {
parent.AddHitList(setup.PacketStack);
} else {
PacketHitList.MethodEnded(ref setup.packetStack);
}
}