This commit is contained in:
parent
57293771a2
commit
d5ebe946e9
2 changed files with 52 additions and 4 deletions
|
|
@ -497,10 +497,23 @@ namespace Server.Items
|
|||
|
||||
to.Send( new DisplaySpellbook( this ) );
|
||||
|
||||
if ( Core.AOS && to.NetState != null && to.NetState.Version != null && to.NetState.Version >= Version_400a )
|
||||
to.Send( new NewSpellbookContent( this, ItemID, BookOffset + 1, m_Content ) );
|
||||
else
|
||||
to.Send( new SpellbookContent( m_Count, BookOffset + 1, m_Content, this ) );
|
||||
if ( to.NetState == null )
|
||||
return;
|
||||
|
||||
if ( Core.AOS ) {
|
||||
if ( to.NetState.Version != null && to.NetState.Version >= Version_400a ) {
|
||||
to.Send( new NewSpellbookContent( this, ItemID, BookOffset + 1, m_Content ) );
|
||||
} else {
|
||||
to.Send( new SpellbookContent( m_Count, BookOffset + 1, m_Content, this ) );
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( to.NetState.IsPost6017 ) {
|
||||
to.Send( new SpellbookContent6017( m_Count, BookOffset + 1, m_Content, this ) );
|
||||
} else {
|
||||
to.Send( new SpellbookContent( m_Count, BookOffset + 1, m_Content, this ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Mobile m_Crafter;
|
||||
|
|
|
|||
|
|
@ -1531,6 +1531,41 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public sealed class SpellbookContent6017 : Packet
|
||||
{
|
||||
public SpellbookContent6017( int count, int offset, ulong content, Item item ) : base( 0x3C )
|
||||
{
|
||||
this.EnsureCapacity( 5 + (count * 20) );
|
||||
|
||||
int written = 0;
|
||||
|
||||
m_Stream.Write( (ushort) 0 );
|
||||
|
||||
ulong mask = 1;
|
||||
|
||||
for ( int i = 0; i < 64; ++i, mask <<= 1 )
|
||||
{
|
||||
if ( (content & mask) != 0 )
|
||||
{
|
||||
m_Stream.Write( (int) (0x7FFFFFFF - i) );
|
||||
m_Stream.Write( (ushort) 0 );
|
||||
m_Stream.Write( (byte) 0 );
|
||||
m_Stream.Write( (ushort) (i + offset) );
|
||||
m_Stream.Write( (short) 0 );
|
||||
m_Stream.Write( (short) 0 );
|
||||
m_Stream.Write( (byte) 0 ); // Grid Location?
|
||||
m_Stream.Write( (int) item.Serial );
|
||||
m_Stream.Write( (short) 0 );
|
||||
|
||||
++written;
|
||||
}
|
||||
}
|
||||
|
||||
m_Stream.Seek( 3, SeekOrigin.Begin );
|
||||
m_Stream.Write( (ushort) written );
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ContainerDisplay : Packet
|
||||
{
|
||||
public ContainerDisplay( Container c ) : base( 0x24, 7 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue