Exemple #1
0
 public NPC(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Field2 = 0x9;
     this.Field7 = 2;
     this.Attributes[GameAttribute.Is_NPC] = true;
 }
Exemple #2
0
 public ServerProp(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Field2 = 16;
     this.Field7 = 0x00000001;
     this.CollFlags = 0; // a hack for passing through blockers /fasbat
 }
Exemple #3
0
 public TreasurePygmy(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     (Brain as MonsterBrain).AddPresetPower(105371);
     (Brain as MonsterBrain).AddPresetPower(54836);
     (Brain as MonsterBrain).AddPresetPower(105665);
 }
Exemple #4
0
        public static TagMap FindTagMapWithKey(int powerSNO, TagKey key)
        {
            Power power = (Power)MPQStorage.Data.Assets[SNOGroup.Power][powerSNO].Data;

            // TODO: figure out which tagmaps to search and in what order, eventually will probably
            // have to reorder them based on whether PvPing or not.
            TagMap[] tagMaps = new TagMap[]
            {
                power.Powerdef.GeneralTagMap,
                power.Powerdef.TagMap,
                power.Powerdef.ContactTagMap0,
                power.Powerdef.ContactTagMap1,
                power.Powerdef.ContactTagMap2,
                power.Powerdef.ContactTagMap3,
                power.Powerdef.PVPGeneralTagMap,
                power.Powerdef.PVPContactTagMap0,
                power.Powerdef.PVPContactTagMap1,
                power.Powerdef.PVPContactTagMap2,
                power.Powerdef.PVPContactTagMap3,
            };

            foreach (TagMap tagmap in tagMaps)
            {
                if (tagmap.ContainsKey(key))
                    return tagmap;
            }

            return null;
        }
Exemple #5
0
        public Portal(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Destination = new ResolvedPortalDestination
            {
                WorldSNO = tags[MarkerKeys.DestinationWorld].Id,
            };

            if (tags.ContainsKey(MarkerKeys.DestinationLevelArea))
                this.Destination.DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id;

            if (tags.ContainsKey(MarkerKeys.DestinationActorTag))
                this.Destination.StartingPointActorTag = tags[MarkerKeys.DestinationActorTag];
            else
                Logger.Warn("Found portal {0}without target location actor", this.ActorSNO.Id);

            this.Field2 = 16;

            // FIXME: Hardcoded crap; probably don't need to set most of these. /komiga
            this.Attributes[GameAttribute.MinimapActive] = true;
            this.Attributes[GameAttribute.Hitpoints_Max_Total] = 1f;
            this.Attributes[GameAttribute.Hitpoints_Max] = 0.0009994507f;
            this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 3.051758E-05f;
            this.Attributes[GameAttribute.Hitpoints_Cur] = 0.0009994507f;
            this.Attributes[GameAttribute.Level] = 1;
        }
Exemple #6
0
 public Vendor(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Attributes[GameAttribute.MinimapActive] = true;
     _vendorGrid = new InventoryGrid(this, 1, 20, (int)EquipmentSlotId.Vendor);
     PopulateItems();
 }
Exemple #7
0
 public Hireling(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     //this.Attributes[GameAttribute.TeamID] = 2;
     Interactions.Add(new HireInteraction());
     Interactions.Add(new InventoryInteraction());
 }
Exemple #8
0
        public Artisan(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Attributes[GameAttribute.MinimapActive] = true;

            Interactions.Add(new CraftInteraction());
        }
Exemple #9
0
 public Barricade(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     base.Attributes[GameAttribute.Experience_Granted] = 0;
     base.Attributes[GameAttribute.DropsNoLoot] = true;
     this.Attributes[GameAttribute.Hitpoints_Cur] = 1;
 }
Exemple #10
0
        public Monster(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Field2 = 0x8;
            this.GBHandle.Type = (int)GBHandleType.Monster; this.GBHandle.GBID = 1;
            this.Attributes[GameAttribute.Experience_Granted] = 125;

        }
Exemple #11
0
        public Gizmo(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Field2 = 16;
            this.Field7 = 0x00000001;

            this.Attributes[Mooege.Net.GS.Message.GameAttribute.Hitpoints_Cur] = 1;
        }
Exemple #12
0
 public Cain(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Attributes[GameAttribute.MinimapActive] = true;
     Conversations.Add(new ConversationInteraction(72416));
     Conversations.Add(new ConversationInteraction(198588));
     Conversations.Add(new ConversationInteraction(73171));
     Interactions.Add(new IdentifyAllInteraction());
 }
 public DesctructibleLootContainer(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     if (ActorData.TagMap.ContainsKey(ActorKeys.LootTreasureClass))
         TreasureClass = (TreasureClass)ActorData.TagMap[ActorKeys.LootTreasureClass].Target;
     base.Attributes[GameAttribute.Experience_Granted] = 0;
     this.Attributes[GameAttribute.Hitpoints_Cur] = 1;
     base.Attributes[GameAttribute.DropsNoLoot] = true;
 }
Exemple #14
0
 public Scoundrel(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     mainSNO = 4644;
     hirelingSNO = 52694;
     proxySNO = 192941;
     skillKit = 0x8AFE;
     hirelingGBID = StringHashHelper.HashItemName("Scoundrel");
     Attributes[GameAttribute.Hireling_Class] = 2;
 }
Exemple #15
0
 public Templar(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     mainSNO = 4538;
     hirelingSNO = 0x0000CDD5;
     proxySNO = 0x0002F1AC;
     skillKit = 0x8AFB;
     hirelingGBID = StringHashHelper.HashItemName("Templar");
     this.Attributes[GameAttribute.Hireling_Class] = 1;
 }
Exemple #16
0
 public Enchantress(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     mainSNO = 4062;
     hirelingSNO = -1;
     proxySNO = 192942;
     skillKit = 87094;
     hirelingGBID = StringHashHelper.HashItemName("Enchantress");
     Attributes[Mooege.Net.GS.Message.GameAttribute.Hireling_Class] = 3;
 }
Exemple #17
0
 public Zombie(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
     this.Attributes[GameAttribute.Hitpoints_Max_Total] = 5f;
     this.Attributes[GameAttribute.Hitpoints_Max] = 5f;
     this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
     this.Attributes[GameAttribute.Hitpoints_Cur] = 5f;
     this.Attributes[GameAttribute.Attacks_Per_Second_Total] = 1.0f;
     this.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0] = 5f;
     this.Attributes[GameAttribute.Damage_Weapon_Delta_Total, 0] = 7f;
 }
Exemple #18
0
        public InteractiveNPC(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Attributes[GameAttribute.NPC_Has_Interact_Options, 0] = true;
            this.Attributes[GameAttribute.NPC_Is_Operatable] = true;
            //this.Attributes[GameAttribute.Buff_Visual_Effect, 0x00FFFFF] = true;
            Interactions = new List<IInteraction>();
            Conversations = new List<ConversationInteraction>();

            foreach(var quest in World.Game.Quests)
                quest.OnQuestProgress += new Games.Quest.QuestProgressDelegate(quest_OnQuestProgress);
            UpdateConversationList(); // show conversations with no quest dependency
        }
Exemple #19
0
 public LootContainer(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     try
     {
         _treasureClass = (TreasureClass)ActorData.TagMap[ActorKeys.LootTreasureClass].Target;
     }
     catch (Exception)
     {
         Logger.Warn("Could not load treasure class for loot actor because it is either not tagged or the treasure class is not available. Using standard treasure class instead");
         _treasureClass = TreasureClass.GenericTreasure;
     }
 }
Exemple #20
0
        public Spawner(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Field2 = 8;
            this.Field7 = 0x00000000;

            //Actor.Data.TagMap contains: {66368 = 291072}
            //public static TagKeyInt Spawn2 = new TagKeyInt(291072);
            //TODO: Find why Tags is not the same as Actor.Data.TagMap
            if (Tags.ContainsKey(MarkerKeys.SpawnActor))
                this.ActorToSpawnSNO = Tags[MarkerKeys.SpawnActor];

        }
Exemple #21
0
 public CaptainRumford(World world, int snoID, TagMap tags)
     : base(world, snoID, tags)
 {
     this.Brain = new AI.Brains.AggressiveNPCBrain(this);
     (Brain as AI.Brains.AggressiveNPCBrain).PresetPowers.Add(0x00007780);// Melee Instant.
     this.Attributes[GameAttribute.Hitpoints_Max_Total] = 50f;
     this.Attributes[GameAttribute.Hitpoints_Max] = 50f;
     this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
     this.Attributes[GameAttribute.Hitpoints_Cur] = 50f;
     this.Attributes[GameAttribute.Attacks_Per_Second_Total] = 1.0f;
     this.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0] = 5f;
     this.Attributes[GameAttribute.Damage_Weapon_Delta_Total, 0] = 7f;
     this.WalkSpeed = 0.34f;
 }
Exemple #22
0
        public TreasureGoblin(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Brain = new MonsterBrain(this);
            (Brain as MonsterBrain).AddPresetPower(105371);
            (Brain as MonsterBrain).AddPresetPower(54055);
            //(Brain as MonsterBrain).AddPresetPower(54836); //ThrowPortal
            //(Brain as MonsterBrain).AddPresetPower(105665); //ThrowPortal_Fast
            this.Attributes[GameAttribute.Hitpoints_Max_Total] = 5f;
            this.Attributes[GameAttribute.Hitpoints_Max] = 5f;
            this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
            this.Attributes[GameAttribute.Hitpoints_Cur] = 5f;
            this.Attributes[GameAttribute.Attacks_Per_Second_Total] = 1.0f;
            this.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0] = 5f;
            this.Attributes[GameAttribute.Damage_Weapon_Delta_Total, 0] = 7f;

        }
Exemple #23
0
        public Portal(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            

            try
            {
                this.Destination = new ResolvedPortalDestination
                {
                    WorldSNO = tags[MarkerKeys.DestinationWorld].Id,
                    DestLevelAreaSNO = tags[MarkerKeys.DestinationWorld].Id,
                    StartingPointActorTag = tags[MarkerKeys.DestinationActorTag]
                };

                // Override minimap icon in merkerset tags
                if (tags.ContainsKey(MarkerKeys.MinimapTexture))
                {
                    MinimapIcon = tags[MarkerKeys.MinimapTexture].Id;
                }
                else
                {
                    MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id;
                }

            }
            catch (KeyNotFoundException)
            {
                Logger.Warn("Portal {0} has incomplete definition", this.ActorSNO.Id);
            }
            this.Field2 = 16;

            // FIXME: Hardcoded crap; probably don't need to set most of these. /komiga
            //this.Attributes[GameAttribute.MinimapActive] = true;
            //this.Attributes[GameAttribute.Hitpoints_Max_Total] = 1f;
            //this.Attributes[GameAttribute.Hitpoints_Max] = 0.0009994507f;
            //this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 3.051758E-05f;
            //this.Attributes[GameAttribute.Hitpoints_Cur] = 0.0009994507f;
            //this.Attributes[GameAttribute.Level] = 1;

            // EREKOSE STUFF
            //Logger.Debug(" (Portal ctor) position is {0}", this._position);
            //Logger.Debug(" (Portal ctor) quest range is {0}", this._questRange);
            // Logger.Debug(" (Portal ctor) is in scene SNO {0}", this.CurrentScene.SceneSNO);            
            //Logger.Debug(" (Portal Ctor) portal used has actor SNO {3}, SNO Name {0}, exists in world sno {1}, has dest world sno {2}", this.ActorSNO.Name, tags[MarkerKeys.DestinationWorld].Id, tags[MarkerKeys.DestinationWorld].Id, snoId);

        }
Exemple #24
0
        public QuillDemon(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Brain = new MonsterBrain(this);
            (Brain as MonsterBrain).AddPresetPower(30005);
            (Brain as MonsterBrain).AddPresetPower(30001);
            (Brain as MonsterBrain).AddPresetPower(107729);
            (Brain as MonsterBrain).AddPresetPower(30592);
            (Brain as MonsterBrain).AddPresetPower(30550);
            this.Attributes[GameAttribute.Hitpoints_Max_Total] = 5f;
            this.Attributes[GameAttribute.Hitpoints_Max] = 5f;
            this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
            this.Attributes[GameAttribute.Hitpoints_Cur] = 5f;
            this.Attributes[GameAttribute.Attacks_Per_Second_Total] = 1.0f;
            this.Attributes[GameAttribute.Damage_Weapon_Min_Total, 0] = 5f;
            this.Attributes[GameAttribute.Damage_Weapon_Delta_Total, 0] = 7f;

        }
Exemple #25
0
        public Living(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Monster = new SNOHandle(SNOGroup.Monster, (ActorData.MonsterSNO));

            // FIXME: This is hardcoded crap
            this.SetFacingRotation((float)(RandomHelper.NextDouble() * 2.0f * Math.PI));
            this.GBHandle.Type = -1; this.GBHandle.GBID = -1;
            this.Field7 = 0x00000001;
            this.Field10 = 0x0;

            //scripted //this.Attributes[GameAttribute.Hitpoints_Max_Total] = 4.546875f;
            this.Attributes[GameAttribute.Hitpoints_Max] = 4.546875f;
            //scripted //this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 0f;
            this.Attributes[GameAttribute.Hitpoints_Cur] = 4.546875f;

            this.Attributes[GameAttribute.Level] = 1;
        }
Exemple #26
0
        public Leah(World world, int snoID, TagMap tags)
            : base(world, snoID, tags)
        {
            Brain = new MinionBrain(this);            

            // lookup GameBalance MonsterLevels.gam asset
            var monsterLevels = (GameBalance)Mooege.Common.MPQ.MPQStorage.Data.Assets[SNOGroup.GameBalance][19760].Data;
            var monsterData = (Monster.Target as MonsterFF);

            // always use normal difficulty levels for now
            if (monsterData.Level.Normal >= 0 && monsterData.Level.Normal < monsterLevels.MonsterLevel.Count)
            {
                //this.Brain = new MonsterBrain(this);
                this.Attributes[GameAttribute.Level] = monsterData.Level.Normal;
                this.Attributes[GameAttribute.Hitpoints_Max] = monsterLevels.MonsterLevel[monsterData.Level.Normal].F0;
                this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max_Total];
                this.WalkSpeed = 0.5f * monsterData.Floats[129];  // TODO: this is probably multiplied by something erekose the 0.3 is because he is way too fast otherwise
            }
        }
Exemple #27
0
        public Trigger(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Field2 = 8;
            this.Field7 = 0x00000000;

            if (Tags.ContainsKey(MarkerKeys.TriggeredConversation))
                this.TriggeredConversation = Tags[MarkerKeys.TriggeredConversation];


            if (Tags.ContainsKey(MarkerKeys.TriggeredConversation1))
                this.TriggeredConversation1 = Tags[MarkerKeys.TriggeredConversation1];

            if (Tags.ContainsKey(MarkerKeys.TriggeredActor))
                this.TriggeredActor = Tags[MarkerKeys.TriggeredActor];

            if (Tags.ContainsKey(MarkerKeys.OnActorSpawnedScript))
                this.OnActorSpawnedScript = Tags[MarkerKeys.OnActorSpawnedScript];

        }
Exemple #28
0
        public Monster(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            this.Field2 = 0x8;
            this.GBHandle.Type = (int)GBHandleType.Monster; this.GBHandle.GBID = 1;
            this.Attributes[GameAttribute.Experience_Granted] = 125;

            // lookup GameBalance MonsterLevels.gam asset
            var monsterLevels = (GameBalance)Mooege.Common.MPQ.MPQStorage.Data.Assets[SNOGroup.GameBalance][19760].Data;
            var monsterData = (Monster.Target as MonsterFF);

            // always use normal difficulty levels for now
            if (monsterData.Level.Normal >= 0 && monsterData.Level.Normal < monsterLevels.MonsterLevel.Count)
            {
                this.Attributes[GameAttribute.Hitpoints_Max] = monsterLevels.MonsterLevel[monsterData.Level.Normal].F0;
                this.Attributes[GameAttribute.Hitpoints_Cur] = this.Attributes[GameAttribute.Hitpoints_Max];
                this.Attributes[GameAttribute.Attacks_Per_Second] = 1.0f;
                this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 5f;
                this.Attributes[GameAttribute.Damage_Weapon_Delta, 0] = 5f;
                this.WalkSpeed = monsterData.Floats[129];  // TODO: this is probably multiplied by something
            }
        }
Exemple #29
0
        public Portal(World world, int snoId, TagMap tags)
            : base(world, snoId, tags)
        {
            try
            {
                this.Destination = new ResolvedPortalDestination
                {
                    WorldSNO = tags[MarkerKeys.DestinationWorld].Id,
                    DestLevelAreaSNO = tags[MarkerKeys.DestinationLevelArea].Id,
                    StartingPointActorTag = tags[MarkerKeys.DestinationActorTag]
                };

                // Override minimap icon in merkerset tags
                if (tags.ContainsKey(MarkerKeys.MinimapTexture))
                {
                    MinimapIcon = tags[MarkerKeys.MinimapTexture].Id;
                }
                else
                {
                    MinimapIcon = ActorData.TagMap[ActorKeys.MinimapMarker].Id;
                }

            }
            catch (KeyNotFoundException)
            {
                Logger.Warn("Portal {0} has incomplete definition", this.ActorSNO.Id);
            }
            this.Field2 = 16;

            // FIXME: Hardcoded crap; probably don't need to set most of these. /komiga
            //this.Attributes[GameAttribute.MinimapActive] = true;
            //this.Attributes[GameAttribute.Hitpoints_Max_Total] = 1f;
            //this.Attributes[GameAttribute.Hitpoints_Max] = 0.0009994507f;
            //this.Attributes[GameAttribute.Hitpoints_Total_From_Level] = 3.051758E-05f;
            //this.Attributes[GameAttribute.Hitpoints_Cur] = 0.0009994507f;
            //this.Attributes[GameAttribute.Level] = 1;
        }
Exemple #30
0
 public override Hireling CreateHireling(World world, int snoId, TagMap tags)
 {
     return(new Scoundrel(world, snoId, tags));
 }
Exemple #31
0
 public Waypoint(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Attributes[GameAttribute.MinimapActive] = true;
 }
Exemple #32
0
 public Checkpoint(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
 }
Exemple #33
0
 public Healthwell(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     Attributes[GameAttribute.MinimapActive] = true;
     Attributes[GameAttribute.Gizmo_State]   = 0;
 }
Exemple #34
0
 public Mystic(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
 }
Exemple #35
0
 public DarkCultists(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #36
0
 public ZombieSkinny(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #37
0
 public CrowlingTorso(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #38
0
 public LeahInnZombie(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #39
0
 public ReturnedArcher(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
     (Brain as MonsterBrain).AddPresetPower(30592);
 }
Exemple #40
0
 public ProximityTriggeredGizmo(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
 }
Exemple #41
0
 public KillianDamort(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
     (Brain as MonsterBrain).AddPresetPower(30592);
 }
Exemple #42
0
 public Jeweler(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
 }
Exemple #43
0
 public SkeletalArcher(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #44
0
 public Decayer(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #45
0
 public NephalemAltar(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     Attributes[GameAttribute.MinimapActive] = true;
 }
Exemple #46
0
 public RavenousDead(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #47
0
        //TODO: Move this out as loading actors can happen even after world was generated
        public static uint loadActor(SNOHandle actorHandle, PRTransform location, World world, TagMap tagMap)
        {
            var actor = Mooege.Core.GS.Actors.ActorFactory.Create(world, actorHandle.Id, tagMap);

            if (actor == null)
            {
                if (actorHandle.Id != -1)
                {
                    Logger.Warn("ActorFactory did not load actor {0}", actorHandle);
                }
                return(0);
            }

            actor.RotationW    = location.Quaternion.W;
            actor.RotationAxis = location.Quaternion.Vector3D;
            actor.EnterWorld(location.Vector3D);
            return(actor.DynamicID);
        }
Exemple #48
0
 public RancidStumbler(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #49
0
 public Shrine(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     Attributes[GameAttribute.MinimapActive] = true;
 }
Exemple #50
0
 public BloatedCorpse(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #51
0
 public Savepoint(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     SavepointId = tags[MarkerKeys.SavepointId];
 }
Exemple #52
0
 public HighLandWalker(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
     (Brain as MonsterBrain).AddPresetPower(30800); //Summon Spores // We summon this to often, need some time blocking
 }
Exemple #53
0
 public StartingPoint(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
 }
Exemple #54
0
 public WoodWraith(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #55
0
        public static Actor Create(World world, int snoId, TagMap tags)
        {
            if (!MPQStorage.Data.Assets[SNOGroup.Actor].ContainsKey(snoId))
            {
                return(null);
            }

            var actorAsset = MPQStorage.Data.Assets[SNOGroup.Actor][snoId];
            var actorData  = actorAsset.Data as Mooege.Common.MPQ.FileFormats.Actor;

            if (actorData == null)
            {
                return(null);
            }

            if (actorData.Type == ActorType.Invalid)
            {
                return(null);
            }

            // see if we have an implementation for actor.
            if (SNOHandlers.ContainsKey(snoId))
            {
                return((Actor)Activator.CreateInstance(SNOHandlers[snoId], new object[] { world, snoId, tags }));
            }

            switch (actorData.Type)
            {
            case ActorType.Monster:
                if (tags.ContainsKey(MarkerKeys.ConversationList))
                {
                    return(new InteractiveNPC(world, snoId, tags));
                }
                else
                if (!MPQStorage.Data.Assets[SNOGroup.Monster].ContainsKey(actorData.MonsterSNO))
                {
                    return(null);
                }

                var monsterAsset = MPQStorage.Data.Assets[SNOGroup.Monster][actorData.MonsterSNO];
                var monsterData  = monsterAsset.Data as Mooege.Common.MPQ.FileFormats.Monster;
                if (monsterData.Type == Mooege.Common.MPQ.FileFormats.Monster.MonsterType.Ally ||
                    monsterData.Type == Mooege.Common.MPQ.FileFormats.Monster.MonsterType.Helper)
                {
                    return(new NPC(world, snoId, tags));
                }
                else
                {
                    return(new Monster(world, snoId, tags));
                }

            case ActorType.Gizmo:

                switch (actorData.TagMap[ActorKeys.GizmoGroup])
                {
                case GizmoGroup.LootContainer:
                    return(new LootContainer(world, snoId, tags));

                case GizmoGroup.DestructibleLootContainer:
                    return(new DesctructibleLootContainer(world, snoId, tags));

                case GizmoGroup.Portal:
                    return(new Portal(world, snoId, tags));

                case GizmoGroup.BossPortal:
                    Logger.Warn("Skipping loading of boss portals");
                    return(null);

                case GizmoGroup.CheckPoint:
                    return(new Checkpoint(world, snoId, tags));

                case GizmoGroup.Waypoint:
                    return(new Waypoint(world, snoId, tags));

                case GizmoGroup.Savepoint:
                    return(new Savepoint(world, snoId, tags));

                case GizmoGroup.ProximityTriggered:
                    return(new ProximityTriggeredGizmo(world, snoId, tags));

                case GizmoGroup.Shrine:
                    return(new Shrine(world, snoId, tags));

                case GizmoGroup.Healthwell:
                    return(new Healthwell(world, snoId, tags));

                case GizmoGroup.ActChangeTempObject:
                case GizmoGroup.Banner:
                case GizmoGroup.Barricade:
                case GizmoGroup.CathedralIdol:
                case GizmoGroup.Destructible:
                case GizmoGroup.Door:
                case GizmoGroup.DungeonStonePortal:
                case GizmoGroup.Headstone:
                case GizmoGroup.HearthPortal:
                case GizmoGroup.NephalemAltar:
                case GizmoGroup.Passive:
                case GizmoGroup.PlayerSharedStash:
                case GizmoGroup.QuestLoot:
                case GizmoGroup.Readable:
                case GizmoGroup.ServerProp:
                case GizmoGroup.Sign:
                case GizmoGroup.Spawner:
                case GizmoGroup.StartLocations:
                case GizmoGroup.TownPortal:
                case GizmoGroup.Trigger:
                case GizmoGroup.WeirdGroup57:
                    Logger.Info("GizmoGroup {0} has no proper implementation, using default gizmo instead", actorData.TagMap[ActorKeys.GizmoGroup]);
                    return(CreateGizmo(world, snoId, tags));

                default:
                    Logger.Warn("Unknown gizmo group {0}", actorData.TagMap[ActorKeys.GizmoGroup]);
                    return(CreateGizmo(world, snoId, tags));
                }


            case ActorType.ServerProp:
                return(new ServerProp(world, snoId, tags));
            }

            return(null);
        }
Exemple #56
0
 public DisentombHulk(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
     (Brain as MonsterBrain).AddPresetPower(30592);
 }
 public ProximityTriggeredGizmo(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
 }
Exemple #58
0
 public EnragedPhantom(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
     this.Attributes[GameAttribute.Damage_Weapon_Min, 0] = 15f;
 }
Exemple #59
0
 public TreasureGoblin(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }
Exemple #60
0
 public NecromanticMinion(World world, int snoId, TagMap tags)
     : base(world, snoId, tags)
 {
     this.Brain = new MonsterBrain(this);
 }