コード例 #1
0
ファイル: NPCCommand.cs プロジェクト: uvbs/Asda2-Server
            public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
            {
                string        str = trigger.Text.NextModifiers();
                Map           map;
                NPCSpawnEntry npcSpawnEntry = NPCCommand.GetNPCSpawnEntry(trigger, str == "c", out map);

                if (npcSpawnEntry == null)
                {
                    return;
                }
                uint num = trigger.Text.NextUInt(1U);

                if (num < 1U)
                {
                    trigger.Reply("Invalid amount: " + (object)num);
                }
                else
                {
                    map.AddNPCSpawnPool(npcSpawnEntry.PoolTemplate);
                    if (trigger.Args.Target != null)
                    {
                        trigger.Args.Target.TeleportTo(map, npcSpawnEntry.Position);
                    }
                    trigger.Reply("Created spawn: {0}", (object)npcSpawnEntry);
                }
            }
コード例 #2
0
ファイル: NPCCommand.cs プロジェクト: uvbs/Asda2-Server
            public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
            {
                string        str = trigger.Text.NextModifiers();
                Map           map;
                NPCSpawnEntry npcSpawnEntry = NPCCommand.GetNPCSpawnEntry(trigger, str == "c", out map);

                if (npcSpawnEntry == null)
                {
                    return;
                }
                if (trigger.Args.Target != null)
                {
                    trigger.Args.Target.TeleportTo(map, npcSpawnEntry.Position);
                }
                trigger.Reply("Created spawn: {0}", (object)npcSpawnEntry);
            }