Skip to content

Commit

Permalink
Migrated hunter BODs
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczy93 committed Jan 15, 2025
1 parent d9ec0ee commit 97cc237
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public HuntingBOBFilter( GenericReader reader )

public void Serialize( GenericWriter writer )
{
if ( IsDefault )
if ( IsDefault || World.ServUOSave )
{
writer.WriteEncodedInt( 0 ); // version
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ public void Serialize( GenericWriter writer )
{
writer.WriteEncodedInt( 0 ); // version

//writer.Write( (bool) m_RequireExceptional );

//writer.WriteEncodedInt( (int) m_DeedType );
//writer.WriteEncodedInt( (int) m_Material );
if(World.ServUOSave){
writer.Write(false); //Require exceptional
writer.WriteEncodedInt( (int) 8 ); //Servuo hunter BODType
writer.WriteEncodedInt(0); //Material, collected points
}
writer.WriteEncodedInt( (int) m_AmountMax );
writer.WriteEncodedInt( (int) m_Price );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public void Serialize( GenericWriter writer )
writer.WriteEncodedInt( (int) m_AmountCur );
writer.WriteEncodedInt( (int) m_Number );
writer.WriteEncodedInt( (int) m_Graphic );
writer.WriteEncodedInt( (int) m_Level );
if(!World.ServUOSave)
writer.WriteEncodedInt( (int) m_Level );
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,19 @@ public void Serialize( GenericWriter writer )
writer.WriteEncodedInt( 0 ); // version

writer.Write( m_ItemType == null ? null : m_ItemType.FullName );
if (World.ServUOSave)
{
writer.Write(false); //Require exceptional
writer.WriteEncodedInt( (int) 8 ); //Servuo hunter BODType
writer.WriteEncodedInt(0); //Material, collected points
}
writer.WriteEncodedInt( (int) m_AmountCur );
writer.WriteEncodedInt( (int) m_AmountMax );
writer.WriteEncodedInt( (int) m_Number );
writer.WriteEncodedInt( (int) m_Graphic );
writer.WriteEncodedInt( (int) m_Price );
writer.WriteEncodedInt( (int) m_Level );
if(!World.ServUOSave)
writer.WriteEncodedInt( (int) m_Level );
}
}
}
6 changes: 3 additions & 3 deletions Scripts/Nelderim/Commands/ServUOSave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public static class ServUoSave
private static readonly List<Type> itemsToDelete = new List<Type>
{
typeof(DesCityWallEast), typeof(DesCityWallSouth), typeof(PowerHourScroll), typeof(TrashBarrel),
typeof(FishingPole), typeof(RewardScroll), typeof(SheafOfHay), typeof(ArcaneFocus), typeof(SmallHunterBOD),
typeof(LargeHunterBOD), typeof(Aquarium), typeof(HuntingBulkOrderBook), typeof(ZakrwawioneBandaze),
typeof(FishingPole), typeof(RewardScroll), typeof(SheafOfHay), typeof(ArcaneFocus),
typeof(Aquarium), typeof(ZakrwawioneBandaze),
typeof(GoldenWool), typeof(SiegeComponent), typeof(FieryCannonball), typeof(SiegeCannon),
typeof(MageSpellbook), typeof(NecroSpellbook), typeof(ChivalrySpellbook), typeof(MaabusCoffinComponent),
typeof(IronSiegeLog), typeof(ExplodingCannonball), typeof(SiegeRam), typeof(HeavySiegeLog),
Expand All @@ -44,7 +44,7 @@ public static class ServUoSave
typeof(ChaosGuard), typeof(XmlQuestNPCChlop), typeof(DeadlyImp), typeof(XmlQuestNPCFuglus),
typeof(XmlQuestNPCPijak), typeof(EscortableMage), typeof(Noble), typeof(DrowAnimalTrainer),
typeof(EvolutionDragon), typeof(EvolutionDragon2), typeof(EvolutionDragon3), typeof(EvolutionDragon4),
typeof(EvolutionDragon5), typeof(FerelTreefellow), typeof(Swoop), typeof(NBurugh)
typeof(EvolutionDragon5), typeof(FerelTreefellow), typeof(Swoop), typeof(NBurugh), typeof(StaffofSnakes)
};

public static void Initialize()
Expand Down

0 comments on commit 97cc237

Please sign in to comment.