*Implement spell casting on transports (no more out of range error, etc)

*Add MO transports to ObjectAccessor storage
*Add functions Position::RelocateOffset and Position::GetPositionOffsetTo to help offset manipulations - BIG thanks to azazelkon for creating formulas!
*Add function to output debug info for MovementInfo and SpellCastTargets
*Throw ByteBufferException on incorrect packGUID read
*Add rfinish function to finish bytebuffer read.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-08-08 20:32:14 +02:00
parent 48c4d4551c
commit 617a56ba29
19 changed files with 434 additions and 235 deletions
+8 -5
View File
@@ -254,6 +254,11 @@ class ByteBuffer
return _rpos;
}
void rfinish()
{
_rpos = wpos();
}
size_t wpos() const { return _wpos; }
size_t wpos(size_t wpos_)
@@ -296,10 +301,10 @@ class ByteBuffer
_rpos += len;
}
bool readPackGUID(uint64& guid)
void readPackGUID(uint64& guid)
{
if(rpos() + 1 > size())
return false;
throw ByteBufferException(false, _rpos, 1, size());
guid = 0;
@@ -311,15 +316,13 @@ class ByteBuffer
if(guidmark & (uint8(1) << i))
{
if(rpos() + 1 > size())
return false;
throw ByteBufferException(false, _rpos, 1, size());
uint8 bit;
(*this) >> bit;
guid |= (uint64(bit) << (i * 8));
}
}
return true;
}
const uint8 *contents() const { return &_storage[0]; }