本文整理汇总了C#中CrystalMpq.MpqFile类的典型用法代码示例。如果您正苦于以下问题:C# MpqFile类的具体用法?C# MpqFile怎么用?C# MpqFile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MpqFile类属于CrystalMpq命名空间,在下文中一共展示了MpqFile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: QuestRange
public QuestRange(MpqFile file)
{
var stream = file.Open();
this.Time0 = new QuestTime(stream);
this.Time1 = new QuestTime(stream);
stream.Close();
}
开发者ID:ripper47,项目名称:mooege,代码行数:7,代码来源:QuestRange.cs
示例2: GameBalance
public GameBalance(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
this.Type = (BalanceType)stream.ReadValueS32();
Gbi = stream.ReadString(256, true);
Xls = stream.ReadString(256, true);
this.I0 = stream.ReadValueS32();
this.I1 = stream.ReadValueS32();
this.ItemType = stream.ReadSerializedData<ItemTypeTable>(); //536
stream.Position += 8;
this.Item = stream.ReadSerializedData<ItemTable>(); //552
stream.Position += 8;
this.Experience = stream.ReadSerializedData<ExperienceTable>(); //568
stream.Position += 8;
this.HelpCodes = stream.ReadSerializedData<HelpCodesTable>(); //584
stream.Position += 8;
this.MonsterLevel = stream.ReadSerializedData<MonsterLevelTable>(); //600
stream.Position += 8;
this.Affixes = stream.ReadSerializedData<AffixTable>(); //616
stream.Position += 8;
this.Heros = stream.ReadSerializedData<HeroTable>(); //632
stream.Position += 8;
this.MovementStyles = stream.ReadSerializedData<MovementStyleTable>(); //648
stream.Position += 8;
this.Labels = stream.ReadSerializedData<LabelGBIDTable>(); //664
stream.Position += 8;
this.LootDistribution = stream.ReadSerializedData<LootDistTable>(); //680
stream.Position += 8;
this.RareItemNames = stream.ReadSerializedData<RareItemNamesTable>(); //696
stream.Position += 8;
this.MonsterAffixes = stream.ReadSerializedData<MonsterAffixesTable>(); //712
stream.Position += 8;
this.RareMonsterNames = stream.ReadSerializedData<MonsterNamesTable>(); //728
stream.Position += 8;
this.SocketedEffects = stream.ReadSerializedData<SocketedEffectTable>(); //744
stream.Position += 8;
this.ItemEnhancement = stream.ReadSerializedData<ItemEnhancementTable>(); //760
stream.Position += 8;
this.ItemDrop = stream.ReadSerializedData<ItemDropTable>(); //776
stream.Position += 8;
this.ItemLevelMod = stream.ReadSerializedData<ItemLevelModTable>(); //792
stream.Position += 8;
this.QualityClass = stream.ReadSerializedData<QualityClassTable>(); //808
stream.Position += 8;
this.Hirelings = stream.ReadSerializedData<HirelingTable>(); //824
stream.Position += 8;
this.SetItemBonus = stream.ReadSerializedData<SetItemBonusTable>(); //840
stream.Position += 8;
this.EliteModifiers = stream.ReadSerializedData<EliteModTable>(); //856
stream.Position += 8;
this.ItemTiers = stream.ReadSerializedData<ItemTierTable>(); //872
stream.Position += 8;
this.PowerFormula = stream.ReadSerializedData<PowerFormulaTable>(); //888
stream.Position += 8;
this.Recipes = stream.ReadSerializedData<RecipeTable>(); //904
stream.Position += 8;
this.ScriptedAchievementEvents = stream.ReadSerializedData<ScriptedAchievementEventsTable>(); //920
stream.Close();
}
开发者ID:mezandre,项目名称:mooege,代码行数:60,代码来源:GameBalance.cs
示例3: Power
public Power(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
LuaName = stream.ReadString(64, true);
stream.Position += 4; // pad 1
Powerdef = new PowerDef(stream);
stream.Position = 440; // Seems like theres a bit of a gap - DarkLotus
I0 = stream.ReadValueS32();
I1 = stream.ReadValueS32();
Chararray2 = stream.ReadString(256, true);
ScriptFormulaCount = stream.ReadValueS32();
ScriptFormulaDetails = stream.ReadSerializedData<ScriptFormulaDetails>();
stream.Position += (3 * 4);
i3 = stream.ReadValueS32();
stream.Position += (3 * 4);
// TODO: please fix this - use our serializable-data readers instead! /raist
// TODO add a class for complied script so it can be deserialized properly. - DarkLotus
// none of the .pow appear to have any data here, and stream position appears to be correct, unsure - DarkLotus
var serCompliedScript = stream.GetSerializedDataPointer();
if (serCompliedScript.Size > 0)
{
long x = stream.Position;
stream.Position = serCompliedScript.Offset + 16;
var buf = new byte[serCompliedScript.Size];
stream.Read(buf, 0, serCompliedScript.Size);
stream.Position = x;
CompliedScript.AddRange(buf);
}
SNOQuestMetaData = stream.ReadValueS32();
stream.Close();
}
开发者ID:ncoop23,项目名称:mooege,代码行数:33,代码来源:Power.cs
示例4: Conversation
public Conversation(MpqFile file)
{
MpqFileStream stream = file.Open();
this.Header = new Header(stream);
this.ConversationType = (ConversationTypes)stream.ReadValueS32();
this.I0 = stream.ReadValueS32();
this.I1 = stream.ReadValueS32();
this.SNOQuest = stream.ReadValueS32();
this.I2 = stream.ReadValueS32();
this.I3 = stream.ReadValueS32();
this.SNOConvPiggyback = stream.ReadValueS32();
this.SNOConvUnlock = stream.ReadValueS32();
this.I4 = stream.ReadValueS32();
this.Unknown = stream.ReadString(128, true);
this.SNOPrimaryNpc = stream.ReadValueS32();
this.SNOAltNpc1 = stream.ReadValueS32();
this.SNOAltNpc2 = stream.ReadValueS32();
this.SNOAltNpc3 = stream.ReadValueS32();
this.SNOAltNpc4 = stream.ReadValueS32();
this.I5 = stream.ReadValueS32();
stream.Position += (2 * 4);
RootTreeNodes = stream.ReadSerializedData<ConversationTreeNode>();
this.Unknown2 = stream.ReadString(256, true);
this.I6 = stream.ReadValueS32();
stream.Position += 12;
CompiledScript = Encoding.ASCII.GetString(stream.ReadSerializedByteArray());
stream.Position += 40;
this.SNOBossEncounter = stream.ReadValueS32();
stream.Close();
}
开发者ID:loonbg,项目名称:mooege,代码行数:34,代码来源:Conversation.cs
示例5: MarkerSet
public MarkerSet(MpqFile file)
{
var stream = file.Open();
Header = new Header(stream);
SNO = stream.ReadInt32();
unknown0 = stream.ReadInt32();
unknown1 = stream.ReadInt32();
serMarkers = new SerializeData(stream);
long x = stream.Position;
Markers = new Marker[serMarkers.Size / 208];
stream.Position = serMarkers.Offset + 16;
for (int i = 0; i < serMarkers.Size / 208; i++)
{
Markers[i] = new Marker(stream);
}
stream.Position = x;
stream.Position += (15 * 4); // pad 15
serNoSpawns = new SerializeData(stream);
stream.Position += (14 * 4);
aabb = new AABB_(stream);
i0 = stream.ReadInt32();
byte[] buf = new byte[256];
stream.Read(buf, 0, 256); filename = Encoding.ASCII.GetString(buf);
nLabel = stream.ReadInt32();
nSpecialIndexCount = stream.ReadInt32();
serSpecialIndexList = new SerializeData(stream);
stream.Close();
}
开发者ID:nerdymerky,项目名称:mooege,代码行数:29,代码来源:MarkerSet.cs
示例6: Quest
public Quest(MpqFile file)
{
MpqFileStream stream = file.Open();
Header = new Header(stream);
QuestType = (QuestType)stream.ReadValueS32();
NumberOfSteps = stream.ReadValueS32();
NumberOfCompletionSteps = stream.ReadValueS32();
I2 = stream.ReadValueS32();
I3 = stream.ReadValueS32();
I4 = stream.ReadValueS32();
I5 = stream.ReadValueS32();
QuestUnassignedStep = new QuestUnassignedStep(stream);
stream.Position += 8;
QuestSteps = stream.ReadSerializedData<QuestStep>();
stream.Position += 8;
QuestCompletionSteps = stream.ReadSerializedData<QuestCompletionStep>();
LevelRange1 = new QuestLevelRange(stream);
LevelRange2 = new QuestLevelRange(stream);
LevelRange3 = new QuestLevelRange(stream);
LevelRange4 = new QuestLevelRange(stream);
stream.Close();
}
开发者ID:loonbg,项目名称:mooege,代码行数:27,代码来源:Quest.cs
示例7: MarkerSet
public MarkerSet(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
this.Markers = stream.ReadSerializedData<Marker>();
stream.Position += (15 * 4);
var pointerSpawns = stream.GetSerializedDataPointer();
//TODO Load spawn locations
stream.Position += (14 * 4);
this.AABB = new AABB(stream);
int i0 = stream.ReadValueS32();
if (i0 != 0 && i0 != 1)
throw new System.Exception("Farmy thought this field is a bool, but apparently its not");
this.ContainsActorLocations = i0 == 1;
this.FileName = stream.ReadString(256, true);
this.NLabel = stream.ReadValueS32();
SpecialIndexCount = stream.ReadValueS32();
var pointerSpecialIndexList = stream.GetSerializedDataPointer();
// TODO Load PointerSpecialIndexList
stream.Close();
}
开发者ID:mstaJ,项目名称:mooege,代码行数:28,代码来源:MarkerSet.cs
示例8: Recipe
public Recipe(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
ItemSpecifierData = new ItemSpecifierData(stream);
stream.Close();
}
开发者ID:jhurliman,项目名称:d3research,代码行数:7,代码来源:Recipe.cs
示例9: Scene
public Scene(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
Int0 = stream.ReadValueS32();
this.AABBBounds = new AABB(stream);
this.AABBMarketSetBounds = new AABB(stream);
this.NavMesh = new NavMeshDef(stream);
this.Exclusions = stream.ReadSerializedInts();
stream.Position += (14 * 4);
this.Inclusions = stream.ReadSerializedInts();
stream.Position += (14 * 4);
this.MarkerSets = stream.ReadSerializedInts();
stream.Position += (14 * 4);
this.LookLink = stream.ReadString(64, true);
this.MsgTriggeredEvent = stream.ReadSerializedData<MsgTriggeredEvent>();
this.Int1 = stream.ReadValueS32();
stream.Position += (3 * 4);
this.NavZone = new NavZoneDef(stream);
this.SNOAppearance = stream.ReadValueS32();
this.SNOPhysMesh = stream.ReadValueS32();
stream.Close();
}
开发者ID:tovipoussin,项目名称:mooege,代码行数:30,代码来源:Scene.cs
示例10: Scene
public Scene(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
Int0 = stream.ReadValueS32();
this.AABBBounds = new AABB(stream);
this.AABBMarketSetBounds = new AABB(stream);
this.NavMesh = new NavMeshDef(stream); //load NavMeshDef
var exclusions = stream.GetSerializedDataPointer();
stream.Position += (14 * 4);
var inclusions = stream.GetSerializedDataPointer();
stream.Position += (14 * 4);
this.MarkerSets = stream.ReadSerializedInts();
stream.Position += (14 * 4);
this.LookLink = stream.ReadString(64, true);
// Maybe this is a list/array - DarkLotus
this.MsgTriggeredEvent = stream.ReadSerializedItem<MsgTriggeredEvent>();
this.Int1 = stream.ReadValueS32();
stream.Position += (3 * 4);
this.NavZone = new NavZoneDef(stream);
stream.Close();
}
开发者ID:keltins,项目名称:mooege,代码行数:30,代码来源:Scene.cs
示例11: QuestRange
public QuestRange(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
this.Start = new QuestTime(stream);
this.End = new QuestTime(stream);
stream.Close();
}
开发者ID:wow4all,项目名称:mooege,代码行数:8,代码来源:QuestRange.cs
示例12: ConversationList
public ConversationList(MpqFile file)
{
MpqFileStream stream = file.Open();
this.Header = new Header(stream);
stream.Position += (12);
ConversationListEntries = stream.ReadSerializedData<ConversationListEntry>();
stream.Close();
}
开发者ID:wow4all,项目名称:mooege,代码行数:8,代码来源:ConversationList.cs
示例13: Recipe
public Recipe(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
this.SNO = stream.ReadValueS32();
stream.Position += (2 * 4);
ItemSpecifierData = new ItemSpecifierData(stream);
stream.Close();
}
开发者ID:ncoop23,项目名称:mooege,代码行数:9,代码来源:Recipe.cs
示例14: Actor
public Actor(MpqFile file)
{
var stream = file.Open();
stream.Seek(16, SeekOrigin.Begin);
this.ActorSNO = stream.ReadInt32();
stream.Position = 120;
this.AnimSetSNO = stream.ReadInt32();
stream.Close();
}
开发者ID:benracoon,项目名称:mooege,代码行数:9,代码来源:Actor.cs
示例15: Tutorial
public Tutorial(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
this.I0 = stream.ReadValueS32();
this.I1 = stream.ReadValueS32();
this.Time = stream.ReadValueS32();
stream.Close();
}
开发者ID:ncoop23,项目名称:mooege,代码行数:9,代码来源:Tutorial.cs
示例16: Encounter
public Encounter(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
this.SNOSpawn = stream.ReadValueS32();
stream.Position += (2 * 4);// pad 2 int
this.Spawnoptions = stream.ReadSerializedData<EncounterSpawnOptions>();
stream.Close();
}
开发者ID:mstaJ,项目名称:mooege,代码行数:9,代码来源:Encounter.cs
示例17: SkillKit
public SkillKit(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
stream.Position += 12;
this.TraitEntries = stream.ReadSerializedData<TraitEntry>();
stream.Position += 8;
this.ActiveSkillEntries = stream.ReadSerializedData<ActiveSkillEntry>();
stream.Close();
}
开发者ID:loonbg,项目名称:mooege,代码行数:10,代码来源:SkillKit.cs
示例18: SceneGroup
public SceneGroup(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
this.I0 = stream.ReadValueS32();
this.Items = stream.ReadSerializedData<SceneGroupItem>();
stream.Position += 8;
this.I1 = stream.ReadValueS32();
stream.Close();
}
开发者ID:jhurliman,项目名称:d3research,代码行数:10,代码来源:SceneGroup.cs
示例19: TreasureClass
public TreasureClass(MpqFile file)
{
var stream = file.Open();
this.Header = new Header(stream);
this.Percentage = stream.ReadValueF32();
this.I0 = stream.ReadValueS32();
this.I1 = stream.ReadValueS32();
stream.Position += 8;
this.ModifierList = stream.ReadSerializedData<LootDropModifier>();
stream.Close();
}
开发者ID:Velhenn,项目名称:mooege,代码行数:11,代码来源:TreasureClass.cs
示例20: Actor
public int BitField1 { get; private set; } // 25 bits - better this this would be an uint
public Actor(MpqFile file)
{
var stream = file.Open();
Header = new Header(stream);
this.Int0 = stream.ReadValueS32();
this.Type = (ActorType)stream.ReadValueS32();
this.ApperanceSNO = stream.ReadValueS32();
this.PhysMeshSNO = stream.ReadValueS32();
this.Cylinder = new AxialCylinder(stream);
this.Sphere = new Sphere(stream);
this.AABBBounds = new AABB(stream);
this.TagMap = stream.ReadSerializedItem<TagMap>();
stream.Position += (2 * 4);
this.AnimSetSNO = stream.ReadValueS32();
this.MonsterSNO = stream.ReadValueS32();
MsgTriggeredEvents = stream.ReadSerializedData<MsgTriggeredEvent>();
this.Int1 = stream.ReadValueS32();
stream.Position += (3 * 4);
this.V0 = new Vector3D(stream.ReadValueF32(), stream.ReadValueF32(), stream.ReadValueF32());
this.Looks = new WeightedLook[8];
for (int i = 0; i < 8; i++)
{
this.Looks[i] = new WeightedLook(stream);
}
this.PhysicsSNO = stream.ReadValueS32();
this.Int2 = stream.ReadValueS32();
this.Int3 = stream.ReadValueS32();
this.Float0 = stream.ReadValueF32();
this.Float1 = stream.ReadValueF32();
this.Float2 = stream.ReadValueF32();
this.ActorCollisionData = new ActorCollisionData(stream);
this.InventoryImages = new int[10]; //Was 5*8/4 - Darklotus
for (int i = 0; i < 10; i++)
{
this.InventoryImages[i] = stream.ReadValueS32();
}
this.Int4 = stream.ReadValueS32();
stream.Position += 4;
BitField0 = stream.ReadValueS32();
CastingNotes = stream.ReadSerializedString();
VoiceOverRole = stream.ReadSerializedString();
// Updated based on BoyC's 010 template and Moack's work. Think we just about read all data from actor now.- DarkLotus
stream.Close();
}
开发者ID:Im2ortal,项目名称:mooege,代码行数:56,代码来源:Actor.cs
注:本文中的CrystalMpq.MpqFile类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论