51 _log(into,
"AddBall: packet_type: %u, len: %u, stamp: %u ", global_head->
packet_type, len, global_head->
stamp);
72 _log(into,
"Error: Invalid entityID for ball %li", ballhead->
entityID);
77 _log(into,
"Error: Invalid ball mode %u for ball %li", ballhead->
mode, ballhead->
entityID);
94 _log(into,
" pos: %.2f, %.2f, %.2f, radius: %.1f", ballhead->
posX, ballhead->
posY, ballhead->
posZ, ballhead->
radius);
101 _log(into,
" mass: %.2f, cloak: %u, harmonic: %i, corp: %i, alliance: %li" ,
111 _log(into,
" maxSpeed: %.2f, Velocity: %.2f, %.2f, %.2f IM: %.4f, SF: %.3f",
118 _log(into,
" %s:", modeNames[ballhead->
mode]);
119 switch(ballhead->
mode) {
122 _log(into,
" This is not coded (or correct) yet.");
129 _log(into,
" formID: %u, direction: %.2f, %.2f, %.2f", b->
formationID, b->
x, b->
y, b->
z);
160 _log(into,
" formID: %u, targetID: %li, followRange: %.1f, ownerID: %li, start: %i", b->
formationID, b->
targetID, b->
followRange, b->
ownerID, b->
effectStamp);
161 _log(into,
" pos: %.2f, %.2f, %.2f", b->
x, b->
y, b->
z);
167 _log(into,
" formID: %u, distance: %.2f, u125: %.3f, start: %i, ownerID: %li", b->
formationID, b->
followRange, b->
unknown125, b->
effectStamp, b->
ownerID);
194 _log(into,
"Error: Unknown ball mode %u!", ballhead->
mode);
216 if (len > init_len) {
217 _log(into,
"ERROR: Consumed more bytes than given: had %u, used %u", init_len, len);
220 return init_len - len;
225 std::string res =
"";
228 if (flags > Ball::Flag::IsFree)
233 if (flags > Ball::Flag::IsGlobal)
238 if (flags > Ball::Flag::IsMassive)
242 res +=
"IsInteractive";
243 if (flags > Ball::Flag::IsInteractive)
248 if (flags > Ball::Flag::IsMoribund)
252 res +=
"HasMiniBalls";
255 res += std::to_string(flags);
#define _log(type, fmt,...)
static const uint8 MAX_DSTBALL
#define _hex(type, data, len)
uint32 DumpBall(LogType into, const uint8 *data, uint32 len)
void DumpUpdate(LogType into, const uint8 *data, uint32 len)
std::string GetFlagNames(uint8 flags)
const char *const modeNames[]