Some fixes.

This commit is contained in:
tomrus88 2009-08-28 22:33:52 +04:00
parent 94fdc7e37e
commit fdc20af337
14 changed files with 99 additions and 56 deletions

3
sql/320/5_bugreport.sql Normal file
View file

@ -0,0 +1,3 @@
alter table `characters`.`bugreport`
change `type` `type` longtext NOT NULL,
change `content` `content` longtext NOT NULL;

View file

@ -61,7 +61,6 @@ class DynamicObject : public WorldObject
uint32 m_spellId; uint32 m_spellId;
uint32 m_effIndex; uint32 m_effIndex;
int32 m_aliveDuration; int32 m_aliveDuration;
time_t m_nextThinkTime;
float m_radius; // radius apply persistent effect, 0 = no persistent effect float m_radius; // radius apply persistent effect, 0 = no persistent effect
AffectedSet m_affected; AffectedSet m_affected;
private: private:

View file

@ -40,10 +40,12 @@
#include "Pet.h" #include "Pet.h"
#include "SocialMgr.h" #include "SocialMgr.h"
void WorldSession::HandleRepopRequestOpcode( WorldPacket & /*recv_data*/ ) void WorldSession::HandleRepopRequestOpcode( WorldPacket & recv_data )
{ {
sLog.outDebug( "WORLD: Recvd CMSG_REPOP_REQUEST Message" ); sLog.outDebug( "WORLD: Recvd CMSG_REPOP_REQUEST Message" );
recv_data.read_skip<uint8>();
if(GetPlayer()->isAlive() || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) if(GetPlayer()->isAlive() || GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST))
return; return;

View file

@ -515,7 +515,8 @@ void WorldSession::HandleMoveKnockBackAck( WorldPacket & recv_data )
{ {
sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK"); sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK");
recv_data.read_skip<uint64>(); // guid uint64 guid;
recv_data.readPackGUID(guid);
recv_data.read_skip<uint32>(); // unk recv_data.read_skip<uint32>(); // unk
MovementInfo movementInfo; MovementInfo movementInfo;
@ -526,7 +527,8 @@ void WorldSession::HandleMoveHoverAck( WorldPacket& recv_data )
{ {
sLog.outDebug("CMSG_MOVE_HOVER_ACK"); sLog.outDebug("CMSG_MOVE_HOVER_ACK");
recv_data.read_skip<uint64>(); // guid uint64 guid;
recv_data.readPackGUID(guid);
recv_data.read_skip<uint32>(); // unk recv_data.read_skip<uint32>(); // unk
MovementInfo movementInfo; MovementInfo movementInfo;
@ -539,7 +541,8 @@ void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recv_data)
{ {
sLog.outDebug("CMSG_MOVE_WATER_WALK_ACK"); sLog.outDebug("CMSG_MOVE_WATER_WALK_ACK");
recv_data.read_skip<uint64>(); // guid uint64 guid;
recv_data.readPackGUID(guid);
recv_data.read_skip<uint32>(); // unk recv_data.read_skip<uint32>(); // unk
MovementInfo movementInfo; MovementInfo movementInfo;

View file

@ -1232,8 +1232,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x4B3*/ { "CMSG_ITEM_REFUND_INFO_REQUEST", STATUS_LOGGEDIN, &WorldSession::HandleItemRefundInfoRequest }, /*0x4B3*/ { "CMSG_ITEM_REFUND_INFO_REQUEST", STATUS_LOGGEDIN, &WorldSession::HandleItemRefundInfoRequest },
/*0x4B4*/ { "CMSG_UNKNOWN_1204", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x4B4*/ { "CMSG_UNKNOWN_1204", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x4B5*/ { "SMSG_UNKNOWN_1205", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x4B5*/ { "SMSG_UNKNOWN_1205", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x4B6*/ { "CMSG_UNKNOWN_1206", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x4B6*/ { "CMSG_CORPSE_MAP_POSITION_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleCorpseMapPositionQuery },
/*0x4B7*/ { "SMSG_UNKNOWN_1207", STATUS_NEVER, &WorldSession::Handle_ServerSide }, /*0x4B7*/ { "CMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x4B8*/ { "CMSG_LFG_SET_ROLES", STATUS_LOGGEDIN, &WorldSession::HandleLfgSetRoles }, /*0x4B8*/ { "CMSG_LFG_SET_ROLES", STATUS_LOGGEDIN, &WorldSession::HandleLfgSetRoles },
/*0x4B9*/ { "UMSG_UNKNOWN_1209", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x4B9*/ { "UMSG_UNKNOWN_1209", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x4BA*/ { "CMSG_UNKNOWN_1210", STATUS_NEVER, &WorldSession::Handle_NULL }, /*0x4BA*/ { "CMSG_UNKNOWN_1210", STATUS_NEVER, &WorldSession::Handle_NULL },

View file

@ -1240,8 +1240,8 @@ enum Opcodes
CMSG_ITEM_REFUND_INFO_REQUEST = 0x4B3, // refund request? CMSG_ITEM_REFUND_INFO_REQUEST = 0x4B3, // refund request?
CMSG_UNKNOWN_1204 = 0x4B4, // lua: ContainerRefundItemPurchase CMSG_UNKNOWN_1204 = 0x4B4, // lua: ContainerRefundItemPurchase
SMSG_UNKNOWN_1205 = 0x4B5, // refund something SMSG_UNKNOWN_1205 = 0x4B5, // refund something
CMSG_UNKNOWN_1206 = 0x4B6, // CMSG, uint32 CMSG_CORPSE_MAP_POSITION_QUERY = 0x4B6, // CMSG, uint32
SMSG_UNKNOWN_1207 = 0x4B7, // SMSG, string+float CMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE = 0x4B7, // SMSG, 3*float+float
CMSG_LFG_SET_ROLES = 0x4B8, // CMSG, empty, lua: SetLFGRoles CMSG_LFG_SET_ROLES = 0x4B8, // CMSG, empty, lua: SetLFGRoles
UMSG_UNKNOWN_1209 = 0x4B9, // not found UMSG_UNKNOWN_1209 = 0x4B9, // not found
CMSG_UNKNOWN_1210 = 0x4BA, // CMSG, uint64, lua: CalendarContextEventSignUp CMSG_UNKNOWN_1210 = 0x4BA, // CMSG, uint64, lua: CalendarContextEventSignUp

View file

@ -1444,10 +1444,9 @@ bool Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
char_flags |= CHARACTER_FLAG_DECLINED; char_flags |= CHARACTER_FLAG_DECLINED;
*p_data << uint32(char_flags); // character flags *p_data << uint32(char_flags); // character flags
// character customize (flags?) // character customize flags
*p_data << uint32(atLoginFlags & AT_LOGIN_CUSTOMIZE ? 1 : 0);// 0x00010000 - faction change *p_data << uint32(atLoginFlags & AT_LOGIN_CUSTOMIZE ? 1 : 0);// 0x00010000 - faction change
*p_data << uint8(1); // unknown *p_data << uint8(1); // unknown
*p_data << uint8(0); // 3.2
// Pets info // Pets info
{ {
@ -4236,16 +4235,16 @@ void Player::CreateCorpse()
corpse->SetUInt32Value( CORPSE_FIELD_GUILD, GetGuildId() ); corpse->SetUInt32Value( CORPSE_FIELD_GUILD, GetGuildId() );
uint32 iDisplayID; uint32 iDisplayID;
uint16 iIventoryType; uint32 iIventoryType;
uint32 _cfi; uint32 _cfi;
for (int i = 0; i < EQUIPMENT_SLOT_END; ++i) for (int i = 0; i < EQUIPMENT_SLOT_END; ++i)
{ {
if(m_items[i]) if(m_items[i])
{ {
iDisplayID = m_items[i]->GetProto()->DisplayInfoID; iDisplayID = m_items[i]->GetProto()->DisplayInfoID;
iIventoryType = (uint16)m_items[i]->GetProto()->InventoryType; iIventoryType = m_items[i]->GetProto()->InventoryType;
_cfi = (uint16(iDisplayID)) | (iIventoryType)<< 24; _cfi = iDisplayID | (iIventoryType << 24);
corpse->SetUInt32Value(CORPSE_FIELD_ITEM + i, _cfi); corpse->SetUInt32Value(CORPSE_FIELD_ITEM + i, _cfi);
} }
} }

View file

@ -2390,8 +2390,6 @@ class MANGOS_DLL_SPEC Player : public Unit
uint16 tradeItems[TRADE_SLOT_COUNT]; uint16 tradeItems[TRADE_SLOT_COUNT];
uint32 tradeGold; uint32 tradeGold;
time_t m_nextThinkTime;
bool m_DailyQuestChanged; bool m_DailyQuestChanged;
time_t m_lastDailyQuestTime; time_t m_lastDailyQuestTime;

View file

@ -457,3 +457,16 @@ void WorldSession::HandlePageTextQueryOpcode( WorldPacket & recv_data )
sLog.outDebug( "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE" ); sLog.outDebug( "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE" );
} }
} }
void WorldSession::HandleCorpseMapPositionQuery( WorldPacket & recv_data )
{
uint32 unk;
recv_data >> unk;
WorldPacket data(CMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE, 4+4+4+4);
data << float(0);
data << float(0);
data << float(0);
data << float(0);
SendPacket(&data);
}

View file

@ -2518,42 +2518,44 @@ enum ResponseCodes
CHAR_CREATE_CHARACTER_CHOOSE_RACE = 0x3F, CHAR_CREATE_CHARACTER_CHOOSE_RACE = 0x3F,
CHAR_CREATE_CHARACTER_ARENA_LEADER = 0x40, CHAR_CREATE_CHARACTER_ARENA_LEADER = 0x40,
CHAR_CREATE_CHARACTER_DELETE_MAIL = 0x41, CHAR_CREATE_CHARACTER_DELETE_MAIL = 0x41,
CHAR_CREATE_CHARACTER_SWAP_FACTION = 0x42,
CHAR_CREATE_CHARACTER_RACE_ONLY = 0x43,
CHAR_DELETE_IN_PROGRESS = 0x42, CHAR_DELETE_IN_PROGRESS = 0x44,
CHAR_DELETE_SUCCESS = 0x43, CHAR_DELETE_SUCCESS = 0x45,
CHAR_DELETE_FAILED = 0x44, CHAR_DELETE_FAILED = 0x46,
CHAR_DELETE_FAILED_LOCKED_FOR_TRANSFER = 0x45, CHAR_DELETE_FAILED_LOCKED_FOR_TRANSFER = 0x47,
CHAR_DELETE_FAILED_GUILD_LEADER = 0x46, CHAR_DELETE_FAILED_GUILD_LEADER = 0x48,
CHAR_DELETE_FAILED_ARENA_CAPTAIN = 0x47, CHAR_DELETE_FAILED_ARENA_CAPTAIN = 0x49,
CHAR_LOGIN_IN_PROGRESS = 0x48, CHAR_LOGIN_IN_PROGRESS = 0x4A,
CHAR_LOGIN_SUCCESS = 0x49, CHAR_LOGIN_SUCCESS = 0x4B,
CHAR_LOGIN_NO_WORLD = 0x4A, CHAR_LOGIN_NO_WORLD = 0x4C,
CHAR_LOGIN_DUPLICATE_CHARACTER = 0x4B, CHAR_LOGIN_DUPLICATE_CHARACTER = 0x4D,
CHAR_LOGIN_NO_INSTANCES = 0x4C, CHAR_LOGIN_NO_INSTANCES = 0x4E,
CHAR_LOGIN_FAILED = 0x4D, CHAR_LOGIN_FAILED = 0x4F,
CHAR_LOGIN_DISABLED = 0x4E, CHAR_LOGIN_DISABLED = 0x50,
CHAR_LOGIN_NO_CHARACTER = 0x4F, CHAR_LOGIN_NO_CHARACTER = 0x51,
CHAR_LOGIN_LOCKED_FOR_TRANSFER = 0x50, CHAR_LOGIN_LOCKED_FOR_TRANSFER = 0x52,
CHAR_LOGIN_LOCKED_BY_BILLING = 0x51, CHAR_LOGIN_LOCKED_BY_BILLING = 0x53,
CHAR_NAME_SUCCESS = 0x52, CHAR_NAME_SUCCESS = 0x54,
CHAR_NAME_FAILURE = 0x53, CHAR_NAME_FAILURE = 0x55,
CHAR_NAME_NO_NAME = 0x54, CHAR_NAME_NO_NAME = 0x56,
CHAR_NAME_TOO_SHORT = 0x55, CHAR_NAME_TOO_SHORT = 0x57,
CHAR_NAME_TOO_LONG = 0x56, CHAR_NAME_TOO_LONG = 0x58,
CHAR_NAME_INVALID_CHARACTER = 0x57, CHAR_NAME_INVALID_CHARACTER = 0x59,
CHAR_NAME_MIXED_LANGUAGES = 0x58, CHAR_NAME_MIXED_LANGUAGES = 0x5A,
CHAR_NAME_PROFANE = 0x59, CHAR_NAME_PROFANE = 0x5B,
CHAR_NAME_RESERVED = 0x5A, CHAR_NAME_RESERVED = 0x5C,
CHAR_NAME_INVALID_APOSTROPHE = 0x5B, CHAR_NAME_INVALID_APOSTROPHE = 0x5D,
CHAR_NAME_MULTIPLE_APOSTROPHES = 0x5C, CHAR_NAME_MULTIPLE_APOSTROPHES = 0x5E,
CHAR_NAME_THREE_CONSECUTIVE = 0x5D, CHAR_NAME_THREE_CONSECUTIVE = 0x5F,
CHAR_NAME_INVALID_SPACE = 0x5E, CHAR_NAME_INVALID_SPACE = 0x60,
CHAR_NAME_CONSECUTIVE_SPACES = 0x5F, CHAR_NAME_CONSECUTIVE_SPACES = 0x61,
CHAR_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 0x60, CHAR_NAME_RUSSIAN_CONSECUTIVE_SILENT_CHARACTERS = 0x62,
CHAR_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 0x61, CHAR_NAME_RUSSIAN_SILENT_CHARACTER_AT_BEGINNING_OR_END = 0x63,
CHAR_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 0x62 CHAR_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME = 0x64
}; };
/// Ban function modes /// Ban function modes

View file

@ -239,7 +239,10 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
if( m_targetMask & TARGET_FLAG_SOURCE_LOCATION ) if( m_targetMask & TARGET_FLAG_SOURCE_LOCATION )
{ {
if(data->rpos() + 4 + 4 + 4 > data->size()) if(data->rpos() + 1 + 4 + 4 + 4 > data->size())
return false;
if(!data->readPackGUID(m_unitTargetGUID))
return false; return false;
*data >> m_srcX >> m_srcY >> m_srcZ; *data >> m_srcX >> m_srcY >> m_srcZ;
@ -308,7 +311,14 @@ void SpellCastTargets::write ( WorldPacket * data )
} }
if( m_targetMask & TARGET_FLAG_SOURCE_LOCATION ) if( m_targetMask & TARGET_FLAG_SOURCE_LOCATION )
{
if(m_unitTarget)
data->append(m_unitTarget->GetPackGUID());
else
*data << uint8(0);
*data << m_srcX << m_srcY << m_srcZ; *data << m_srcX << m_srcY << m_srcZ;
}
if( m_targetMask & TARGET_FLAG_DEST_LOCATION ) if( m_targetMask & TARGET_FLAG_DEST_LOCATION )
{ {
@ -2973,6 +2983,12 @@ void Spell::SendSpellStart()
if ( castFlags & CAST_FLAG_AMMO ) if ( castFlags & CAST_FLAG_AMMO )
WriteAmmoToPacket(&data); WriteAmmoToPacket(&data);
if ( castFlags & CAST_FLAG_UNKNOWN21 )
{
data << uint32(0);
data << uint32(0);
}
m_caster->SendMessageToSet(&data, true); m_caster->SendMessageToSet(&data, true);
} }

View file

@ -77,7 +77,8 @@ enum SpellCastFlags
CAST_FLAG_UNKNOWN10 = 0x00040000, CAST_FLAG_UNKNOWN10 = 0x00040000,
CAST_FLAG_UNKNOWN5 = 0x00080000, // wotlk CAST_FLAG_UNKNOWN5 = 0x00080000, // wotlk
CAST_FLAG_UNKNOWN20 = 0x00100000, CAST_FLAG_UNKNOWN20 = 0x00100000,
CAST_FLAG_UNKNOWN7 = 0x00200000 // wotlk, rune cooldown list CAST_FLAG_UNKNOWN7 = 0x00200000, // wotlk, rune cooldown list
CAST_FLAG_UNKNOWN21 = 0x04000000
}; };
enum SpellNotifyPushType enum SpellNotifyPushType

View file

@ -340,11 +340,17 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
{ {
recvPacket.read_skip<float>(); // unk1, coords? recvPacket.read_skip<float>(); // unk1, coords?
recvPacket.read_skip<float>(); // unk1, coords? recvPacket.read_skip<float>(); // unk1, coords?
recvPacket.read_skip<uint8>(); // >> 1 uint8 unk1;
recvPacket >> unk1; // >> 1 or 0
if(unk1)
{
recvPacket.read_skip<uint32>(); // >> MSG_MOVE_STOP recvPacket.read_skip<uint32>(); // >> MSG_MOVE_STOP
uint64 guid;
recvPacket.readPackGUID(guid);
MovementInfo movementInfo; MovementInfo movementInfo;
ReadMovementInfo(recvPacket, &movementInfo); ReadMovementInfo(recvPacket, &movementInfo);
} }
}
// auto-selection buff level base at target level (in spellInfo) // auto-selection buff level base at target level (in spellInfo)
if(targets.getUnitTarget()) if(targets.getUnitTarget())

View file

@ -570,6 +570,7 @@ class MANGOS_DLL_SPEC WorldSession
void HandleReclaimCorpseOpcode( WorldPacket& recvPacket ); void HandleReclaimCorpseOpcode( WorldPacket& recvPacket );
void HandleCorpseQueryOpcode( WorldPacket& recvPacket ); void HandleCorpseQueryOpcode( WorldPacket& recvPacket );
void HandleCorpseMapPositionQuery( WorldPacket& recvPacket );
void HandleResurrectResponseOpcode(WorldPacket& recvPacket); void HandleResurrectResponseOpcode(WorldPacket& recvPacket);
void HandleSummonResponseOpcode(WorldPacket& recv_data); void HandleSummonResponseOpcode(WorldPacket& recv_data);