本文整理汇总了C#中Mooege类的典型用法代码示例。如果您正苦于以下问题:C# Mooege类的具体用法?C# Mooege怎么用?C# Mooege使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Mooege类属于命名空间,在下文中一共展示了Mooege类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Notify
/// <summary>
/// Notifies the objective, that an event occured. The objective checks if that event matches the event it waits for
/// </summary>
public void Notify(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value)
{
if (type != objective.ObjectiveType) return;
switch (type)
{
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterWorld:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterScene:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.CompleteQuest:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.HadConversation:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterLevelArea:
if (value == objective.SNOName1.SNOId)
{
Counter++;
questStep.UpdateCounter(this);
}
break;
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterTrigger:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EventReceived:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.GameFlagSet:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillGroup:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PlayerFlagSet:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PossessItem:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.TimedEventExpired:
throw new NotImplementedException();
}
}
示例2: Inventory
public Inventory(Mooege.Core.GS.Player.Player owner)
{
this._owner = owner;
this.Items = new Dictionary<uint, Item>();
this._equipment = new Equipment(owner);
this._inventoryStash = new Stash(owner, 6, 10);
}
示例3: NotifyBonus
/// <summary>
/// Notifies the objective (if it is flagged as abonus objective), that an event occured. The objective checks if that event matches the event it waits for
/// </summary>
public void NotifyBonus(Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType type, int value)
{
Logger.Debug(" (NotifyBonus) objective details SNOName 1 : {0}, ID {1} \n SNOName 2 : {2},ID {3} ", objective.SNOName1.Name, objective.SNOName1.Id, objective.SNOName2.Name, objective.SNOName2.Id);
Logger.Debug(" (NotifyBonus) in QuestObjective for type {0} and value {1} and objective.ObjectiveType is {2}", type, value, objective.ObjectiveType);
//if (type != objective.ObjectiveType) return;
switch (type)
{
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.BonusStep:
{
Counter++;
questStep.UpdateBonusCounter(this);
}
break;
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterWorld:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterScene:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.InteractWithActor:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillMonster:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.CompleteQuest:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.HadConversation:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterLevelArea:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EnterTrigger:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.EventReceived:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.GameFlagSet:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.KillGroup:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PlayerFlagSet:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.PossessItem:
case Mooege.Common.MPQ.FileFormats.QuestStepObjectiveType.TimedEventExpired:
throw new NotImplementedException();
}
}
示例4: Reveal
public override bool Reveal(Mooege.Core.GS.Player.Player player)
{
if (TargetPos != null)
// targetpos!=null in this case is used to detect if the portal has been completely initialized to have a target
// if it doesn't have one, it won't be displayed - otherwise the client would crash from this.
{
//Logger.Info("Revealing portal {0}", PortalMessage.AsText());
if (!base.Reveal(player))
return false;
player.InGameClient.SendMessage(new PortalSpecifierMessage()
{
ActorID = this.DynamicID,
Destination = this.Destination
});
// Probably unnecessary since the transform is ACD data and is set in the EnterKnown. /komiga
/*player.InGameClient.SendMessage(new ACDTranslateFacingMessage(Opcodes.ACDTranslateFacingMessage1)
{
ActorID = this.DynamicID,
Angle = 0f,
Field2 = false,
});*/
player.InGameClient.FlushOutgoingBuffer();
return true;
}
return false;
}
示例5: Reveal
public override void Reveal(Mooege.Core.GS.Player.Player player)
{
if (TargetPos != null)
// targetpos!=null in this case is used to detect if the portal has been completely initialized to have a target
// if it doesn't have one, it won't be displayed - otherwise the client would crash from this.
{
//Logger.Info("Revealing portal {0}", PortalMessage.AsText());
base.Reveal(player);
// FIXME: Hardcoded crap
player.InGameClient.SendMessage(new AffixMessage()
{
ActorID = this.DynamicID,
Field1 = 1,
aAffixGBIDs = new int[0]
});
player.InGameClient.SendMessage(new AffixMessage()
{
ActorID = this.DynamicID,
Field1 = 2,
aAffixGBIDs = new int[0]
});
player.InGameClient.SendMessage(new PortalSpecifierMessage()
{
ActorID = this.DynamicID,
Destination = this.Destination
});
player.InGameClient.SendMessage(new ACDCollFlagsMessage()
{
ActorID = this.DynamicID,
CollFlags = 0x00000001,
});
this.Attributes.SendMessage(player.InGameClient, this.DynamicID);
player.InGameClient.SendMessage(new ACDGroupMessage()
{
ActorID = this.DynamicID,
Field1 = -1,
Field2 = -1,
});
player.InGameClient.SendMessage(new ANNDataMessage(Opcodes.ANNDataMessage7)
{
ActorID = this.DynamicID,
});
player.InGameClient.SendMessage(new ACDTranslateFacingMessage(Opcodes.ACDTranslateFacingMessage1)
{
ActorID = this.DynamicID,
Angle = 0f,
Field2 = false,
});
}
player.InGameClient.FlushOutgoingBuffer();
}
示例6: SpellRune
public SpellRune(World world, Mooege.Common.MPQ.FileFormats.ItemTable definition)
: base(world, definition)
{
if (!definition.Name.Contains("X"))
{
// attuned rune, randomize power
int classRnd = RandomHelper.Next(0, 5);
int PowerSNOId = -1;
switch (classRnd)
{
case 0:
PowerSNOId = Skills.Skills.Barbarian.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.Barbarian.AllActiveSkillsList.Count));
break;
case 1:
PowerSNOId = Skills.Skills.DemonHunter.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.DemonHunter.AllActiveSkillsList.Count));
break;
case 2:
PowerSNOId = Skills.Skills.Monk.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.Monk.AllActiveSkillsList.Count));
break;
case 3:
PowerSNOId = Skills.Skills.WitchDoctor.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.WitchDoctor.AllActiveSkillsList.Count));
break;
case 4:
PowerSNOId = Skills.Skills.Wizard.AllActiveSkillsList.ElementAt(RandomHelper.Next(0, Mooege.Core.GS.Skills.Skills.Wizard.AllActiveSkillsList.Count));
break;
}
//this.Attributes[GameAttribute.Rune_Attuned_Power] = PowerSNOId;
}
}
示例7: QuestObjective
public QuestObjective(Mooege.Common.MPQ.FileFormats.QuestStepObjective objective, QuestStep questStep, int id)
{
//Logger.Debug(" (QuestObjective ctor) creating an objective with ID {0}, QuestStepObjective {1} and QuestStep ID {2}", id, objective.Group1Name, questStep.QuestStepID);
ID = id;
this.objective = objective;
this.questStep = questStep;
}
示例8: Inventory
public Inventory(Mooege.Core.GS.Player.Player owner)
{
this._owner = owner;
this.Items = new Dictionary<uint, Item>();
this._equipment = new uint[16];
this._backpack = new uint[6, 10];
this._goldItem = null;
}
示例9: Book
public Book(World world, Mooege.Common.MPQ.FileFormats.ItemTable definition)
: base(world, definition)
{
var actorData = ActorSNO.Target as Mooege.Common.MPQ.FileFormats.Actor;
if (actorData.TagMap.ContainsKey(ActorKeys.Lore))
{
LoreSNOId = actorData.TagMap[ActorKeys.Lore].Id;
}
}
示例10: Book
public Book(World world, Mooege.Common.MPQ.FileFormats.ItemTable definition)
: base(world, definition)
{
// Items are NOT constructed with tags
var actorData = ActorSNO.Target as Mooege.Common.MPQ.FileFormats.Actor;
if (actorData.TagMap.ContainsKey(TagKeys.Lore))
{
LoreSNOId = actorData.TagMap[TagKeys.Lore].Id;
}
}
示例11: Book
public Book(World world, Mooege.Common.MPQ.FileFormats.ItemTable definition)
: base(world, definition)
{
// Items are NOT constructed with tags
var actorData = (Mooege.Common.MPQ.FileFormats.Actor)Mooege.Common.MPQ.MPQStorage.Data.Assets[SNOGroup.Actor][this.ActorSNO.SNOId].Data;
var loreTagEntry = actorData.TagMap.TagMapEntries.FirstOrDefault(x => x.TagID == (int)MarkerTagTypes.LoreSNOId);
if (loreTagEntry != null)
{
LoreSNOId = loreTagEntry.Int2;
}
}
示例12: Book
public Book(World world, Mooege.Common.MPQ.FileFormats.ItemTable definition)
: base(world, definition)
{
var y = MPQStorage.Data.Assets[SNOGroup.Actor].FirstOrDefault(x => x.Value.SNOId == this.SNOId);
var e = (y.Value.Data as Mooege.Common.MPQ.FileFormats.Actor).TagMap.TagMapEntries.FirstOrDefault(z => z.TagID == (int)MarkerTagTypes.LoreSNOId);
if (e != null)
{
LoreSNOId = e.Int2;
}
else
{
LoreSNOId = -1;
}
}
示例13: GetPlayersInRange
private List<Player> GetPlayersInRange(Mooege.Core.GS.Map.World world)
{
// Not as clean and fancy as quadtreee, but the cost is like alot less.
// Quadtree avg's 0.134ms vs 0.004ms for this. Probably could stick to the Quadtree by just only checking every X seconds.
List<Player> playerList = new List<Player>();
foreach (var p in world.Players.Values)
{
if (MovementHelpers.GetDistance(this.Body.Position, p.Position) < 240f)
{
playerList.Add(p);
}
}
return playerList;
}
示例14: World
public World(Mooege.Core.GS.Game.Game game, int worldSNO)
: base(game.NewWorldID)
{
this.Game = game;
this.Game.StartTracking(this);
this.Scenes = new Dictionary<uint, Scene>();
//this.Scenes = new List<Scene>();
this.Actors = new Dictionary<uint, Actor>();
this.Players = new Dictionary<uint, Mooege.Core.GS.Player.Player>();
// NOTE: WorldSNO must be valid before adding it to the game
this.WorldSNO = worldSNO;
this.StartPosition = new Vector3D();
this.Game.AddWorld(this);
}
示例15: Reveal
public override bool Reveal(Mooege.Core.GS.Player.Player player)
{
if (!base.Reveal(player))
return false;
player.InGameClient.SendMessage(new PortalSpecifierMessage()
{
ActorID = this.DynamicID,
Destination = this.Destination
});
// Show a minimap icon
Mooege.Common.MPQ.Asset asset;
string markerName = "";
if (Mooege.Common.MPQ.MPQStorage.Data.Assets[Common.Types.SNO.SNOGroup.LevelArea].TryGetValue(this.Destination.DestLevelAreaSNO, out asset))
markerName = System.IO.Path.GetFileNameWithoutExtension(asset.FileName);
//else Logger.Warn("No asset for LevelArea {0}", this.Destination.DestLevelAreaSNO);
player.InGameClient.SendMessage(new MapMarkerInfoMessage()
{
Id = (int)Opcodes.MapMarkerInfoMessage,
Field0 = (int)World.NewSceneID, // TODO What is the correct id space for mapmarkers?
Field1 = new WorldPlace()
{
Position = this.Position,
WorldID = this._world.DynamicID
},
Field2 = 0x00018FB0, /* Marker_DungeonEntrance.tex */ // TODO Dont mark all portals as dungeon entrances... some may be exits too (although d3 does not necesarrily use the correct markers). Also i have found no hacky way to determine whether a portal is entrance or exit - farmy
m_snoStringList = 0x0000CB2E, /* LevelAreaNames.stl */ // TODO Dont use hardcoded numbers
Field4 = StringHashHelper.HashNormal(markerName),
Field5 = 0,
Field6 = 0,
Field7 = 0,
Field8 = 0,
Field9 = true,
Field10 = false,
Field11 = true,
Field12 = 0
});
return true;
}