public override void Init(StoC_0x81_ShowDialog pak) { message = pak.ReadString(); // 0x0C+ }
public override void Init(StoC_0x81_ShowDialog pak) { questName = pak.ReadPascalString(); questDesc = pak.ReadPascalString(); dialogLen = pak.ReadShort(); message = pak.ReadString(dialogLen); questID = pak.ReadShort(); goalsCount = pak.ReadByte(); goals = new string[goalsCount]; for (int i = 0; i < goalsCount; i++) { #if SKIP_CR_IN_DESCRIPTION questLevel = pak.ReadByte(); // temporary used goals[i] = pak.ReadString(questLevel - 1); // 0x0A on end string pak.Skip(1); // skip 0x0A on end string #else goals[i] = pak.ReadPascalString(); #endif } questLevel = pak.ReadByte(); rewardGold = pak.ReadByte(); rewardExp = pak.ReadByte(); baseRewardsCount = pak.ReadByte(); baseRewards = new StoC_0x02_InventoryUpdate.Item[baseRewardsCount]; for (int i = 0; i < baseRewardsCount; i++) { StoC_0x02_InventoryUpdate.Item item = new StoC_0x02_InventoryUpdate.Item(); item.level = pak.ReadByte(); item.value1 = pak.ReadByte(); item.value2 = pak.ReadByte(); item.hand = pak.ReadByte(); byte temp = pak.ReadByte(); //WriteByte((byte) ((item.Type_Damage*64) + item.Object_Type)); item.damageType = (byte)(temp >> 6); item.objectType = (byte)(temp & 0x3F); item.weight = pak.ReadShort(); item.condition = pak.ReadByte(); item.durability = pak.ReadByte(); item.quality = pak.ReadByte(); item.bonus = pak.ReadByte(); item.model = pak.ReadShort(); item.extension = pak.ReadByte(); item.color = pak.ReadShort(); item.flag = pak.ReadByte(); if ((item.flag & 0x08) == 0x08) { item.effectIcon = pak.ReadShort(); item.effectName = pak.ReadPascalString(); } if ((item.flag & 0x10) == 0x10) { item.effectIcon2 = pak.ReadShort(); item.effectName2 = pak.ReadPascalString(); } item.effect = pak.ReadByte(); item.name = pak.ReadPascalString(); baseRewards[i] = item; } optionalRewardsChoiceMax = pak.ReadByte(); optionalRewardsCount = pak.ReadByte(); optionalRewards = new StoC_0x02_InventoryUpdate.Item[optionalRewardsCount]; for (int i = 0; i < optionalRewardsCount; i++) { StoC_0x02_InventoryUpdate.Item item = new StoC_0x02_InventoryUpdate.Item(); item.level = pak.ReadByte(); item.value1 = pak.ReadByte(); item.value2 = pak.ReadByte(); item.hand = pak.ReadByte(); byte temp = pak.ReadByte(); //WriteByte((byte) ((item.Type_Damage*64) + item.Object_Type)); item.damageType = (byte)(temp >> 6); item.objectType = (byte)(temp & 0x3F); item.weight = pak.ReadShort(); item.condition = pak.ReadByte(); item.durability = pak.ReadByte(); item.quality = pak.ReadByte(); item.bonus = pak.ReadByte(); item.model = pak.ReadShort(); item.extension = pak.ReadByte(); item.color = pak.ReadShort(); item.flag = pak.ReadByte(); if ((item.flag & 0x08) == 0x08) { item.effectIcon = pak.ReadShort(); item.effectName = pak.ReadPascalString(); } if ((item.flag & 0x10) == 0x10) { item.effectIcon2 = pak.ReadShort(); item.effectName2 = pak.ReadPascalString(); } item.effect = pak.ReadByte(); item.name = pak.ReadPascalString(); optionalRewards[i] = item; } }
public override void Init(StoC_0x81_ShowDialog pak) { questName = pak.ReadPascalString(); // 0x0c questDesc = pak.ReadPascalString(); dialogLen = pak.ReadShort(); message = pak.ReadString(dialogLen); questID = pak.ReadShort(); goalsCount = pak.ReadByte(); goals = new string[goalsCount]; for (int i = 0; i < goalsCount; i++) { #if SKIP_CR_IN_DESCRIPTION questLevel = pak.ReadByte(); // temporary used goals[i] = pak.ReadString(questLevel - 1); // 0x0A on end string pak.Skip(1);// skip 0x0A on end string #else goals[i] = pak.ReadPascalString(); #endif } unk1_194 = pak.ReadShort(); questLevel = pak.ReadByte(); rewardGold = pak.ReadByte(); rewardExp = pak.ReadByte(); baseRewardsCount = pak.ReadByte(); baseRewards = new StoC_0x02_InventoryUpdate.Item[baseRewardsCount]; for (int i = 0; i < baseRewardsCount; i++) { StoC_0x02_InventoryUpdate.Item item = new StoC_0x02_InventoryUpdate.Item(); item.unk1_1115 = pak.ReadShort(); item.level = pak.ReadByte(); item.value1 = pak.ReadByte(); item.value2 = pak.ReadByte(); item.hand = pak.ReadByte(); byte temp = pak.ReadByte(); //WriteByte((byte) ((item.Type_Damage*64) + item.Object_Type)); item.damageType = (byte)(temp >> 6); item.objectType = (byte)(temp & 0x3F); item.unk1_1112 = pak.ReadByte(); item.weight = pak.ReadShort(); item.condition = pak.ReadByte(); item.durability = pak.ReadByte(); item.quality = pak.ReadByte(); item.bonus = pak.ReadByte(); item.unk2_1112 = pak.ReadByte(); item.model = pak.ReadShort(); item.extension = pak.ReadByte(); item.color = pak.ReadShort(); item.flag = pak.ReadByte(); if ((item.flag & 0x08) == 0x08) { item.effectIcon = pak.ReadShort(); item.effectName = pak.ReadPascalString(); } if ((item.flag & 0x10) == 0x10) { item.effectIcon2 = pak.ReadShort(); item.effectName2 = pak.ReadPascalString(); } item.effect = pak.ReadByte(); item.name = pak.ReadPascalString(); baseRewards[i] = item; } optionalRewardsChoiceMax = pak.ReadByte(); optionalRewardsCount = pak.ReadByte(); optionalRewards = new StoC_0x02_InventoryUpdate.Item[optionalRewardsCount]; for (int i = 0; i < optionalRewardsCount; i++) { StoC_0x02_InventoryUpdate.Item item = new StoC_0x02_InventoryUpdate.Item(); item.unk1_1115 = pak.ReadShort(); item.level = pak.ReadByte(); item.value1 = pak.ReadByte(); item.value2 = pak.ReadByte(); item.hand = pak.ReadByte(); byte temp = pak.ReadByte(); //WriteByte((byte) ((item.Type_Damage*64) + item.Object_Type)); item.damageType = (byte)(temp >> 6); item.objectType = (byte)(temp & 0x3F); item.unk1_1112 = pak.ReadByte(); item.weight = pak.ReadShort(); item.condition = pak.ReadByte(); item.durability = pak.ReadByte(); item.quality = pak.ReadByte(); item.bonus = pak.ReadByte(); item.unk2_1112 = pak.ReadByte(); item.model = pak.ReadShort(); item.extension = pak.ReadByte(); item.color = pak.ReadShort(); item.flag = pak.ReadByte(); if ((item.flag & 0x08) == 0x08) { item.effectIcon = pak.ReadShort(); item.effectName = pak.ReadPascalString(); } if ((item.flag & 0x10) == 0x10) { item.effectIcon2 = pak.ReadShort(); item.effectName2 = pak.ReadPascalString(); } item.effect = pak.ReadByte(); item.name = pak.ReadPascalString(); optionalRewards[i] = item; } }
public override void Init(StoC_0x81_ShowDialog pak) { message = pak.ReadString(); // 0x0C+ }