mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 13:37:08 +00:00
[6889] Backport some not client version specific changes and fixes from 303 branch.
This commit is contained in:
parent
480a935216
commit
3da9f3f4cc
56 changed files with 1998 additions and 377 deletions
|
|
@ -226,6 +226,24 @@ class MANGOS_DLL_SPEC Object
|
|||
return (m_uint32Values[ index ] & flag) != 0;
|
||||
}
|
||||
|
||||
void SetByteFlag( uint16 index, uint8 offset, uint8 newFlag );
|
||||
void RemoveByteFlag( uint16 index, uint8 offset, uint8 newFlag );
|
||||
|
||||
void ToggleFlag( uint16 index, uint8 offset, uint8 flag )
|
||||
{
|
||||
if(HasByteFlag(index, offset, flag))
|
||||
RemoveByteFlag(index, offset, flag);
|
||||
else
|
||||
SetByteFlag(index, offset, flag);
|
||||
}
|
||||
|
||||
bool HasByteFlag( uint16 index, uint8 offset, uint8 flag ) const
|
||||
{
|
||||
ASSERT( index < m_valuesCount || PrintIndexError( index , false ) );
|
||||
ASSERT( offset < 4 );
|
||||
return (((uint8*)&m_uint32Values[index])[offset] & flag) != 0;
|
||||
}
|
||||
|
||||
void ApplyModFlag( uint16 index, uint32 flag, bool apply)
|
||||
{
|
||||
if(apply) SetFlag(index,flag); else RemoveFlag(index,flag);
|
||||
|
|
@ -297,7 +315,7 @@ class MANGOS_DLL_SPEC Object
|
|||
{
|
||||
int32 *m_int32Values;
|
||||
uint32 *m_uint32Values;
|
||||
float *m_floatValues;
|
||||
float *m_floatValues;
|
||||
};
|
||||
|
||||
uint32 *m_uint32Values_mirror;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue