Full Version : Total weight on pcked creatures
xmlspawner >>Scripting Support >>Total weight on pcked creatures
<< Prev | Next >>
Erica- 01-15-2008
Ok on osi if pet is tamed or bonded it shows total weight which i got that part fixed. But on osi even if pet is not been tamed yet and you see him wild it
should also show weight. So i'm missing the weight part as when those
packed pets are wild.
what do i need so it shows it on wild packed pets heres that part im sure i am missing something here Thanks.

CODE
public override void AddNameProperties( ObjectPropertyList list ) { base.AddNameProperties( list ); if ( Controlled && Commandable ) {
#region Mondain's Legacy
if ( Backpack is StrongBackpack && Alive && Core.ML )
{
if ( TotalWeight == 1 )
list.Add( 1072788, "{0}", 1 ); // Weight: ~1_WEIGHT~ stone
else
list.Add( 1072789, "{0}", TotalWeight ); // Weight: ~1_WEIGHT~ stones
}
#endregion
if ( Summoned )
list.Add( 1049646 ); // (summoned)
else if ( IsBonded ) //Intentional difference (showing ONLY bonded when bonded instead of bonded & tame)
list.Add( 1049608 ); // (bonded)
else
list.Add( 502006 ); // (tame)

ArteGordon- 01-15-2008
I would just move the test for Controlled and Commandable down, like this

QUOTE
public override void AddNameProperties( ObjectPropertyList list ) { base.AddNameProperties( list ); #region Mondain's Legacy if ( Backpack is StrongBackpack && Alive && Core.ML )
{
if ( TotalWeight == 1 )
list.Add( 1072788, "{0}", 1 ); // Weight: ~1_WEIGHT~ stone
else
list.Add( 1072789, "{0}", TotalWeight ); // Weight: ~1_WEIGHT~ stones
}
#endregion
if ( Controlled && Commandable )
{
if ( Summoned )
list.Add( 1049646 ); // (summoned)
else if ( IsBonded ) //Intentional difference (showing ONLY bonded when bonded instead of bonded & tame)
list.Add( 1049608 ); // (bonded)
else
list.Add( 502006 ); // (tame)

I believe that only pack animals will have strong backpacks so only those will show weight.