Esempio n. 1
0
            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);
                }
            }
Esempio n. 2
0
            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);
            }