mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
Fixed player name response (chat now working)
This commit is contained in:
parent
8f1edbf513
commit
2197da6407
11 changed files with 80 additions and 46 deletions
|
|
@ -636,6 +636,11 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
|
|||
DEBUG_LOG( "WORLD: Sent motd (SMSG_MOTD)" );
|
||||
}
|
||||
|
||||
data.Initialize(SMSG_LEARNED_DANCE_MOVES, 4+4);
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
SendPacket(&data);
|
||||
|
||||
//QueryResult *result = CharacterDatabase.PQuery("SELECT guildid,rank FROM guild_member WHERE guid = '%u'",pCurrChar->GetGUIDLow());
|
||||
QueryResult *resultGuild = holder->GetResult(PLAYER_LOGIN_QUERY_LOADGUILD);
|
||||
|
||||
|
|
@ -721,7 +726,6 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
|
|||
|
||||
ObjectAccessor::Instance().AddObject(pCurrChar);
|
||||
//sLog.outDebug("Player %s added to Map.",pCurrChar->GetName());
|
||||
pCurrChar->GetSocial()->SendSocialList();
|
||||
|
||||
pCurrChar->SendInitialPacketsAfterAddToMap();
|
||||
|
||||
|
|
@ -1206,20 +1210,22 @@ void WorldSession::HandleRemoveGlyph( WorldPacket & recv_data )
|
|||
uint32 slot;
|
||||
recv_data >> slot;
|
||||
|
||||
if(slot > MAX_GLYPH_SLOT_INDEX)
|
||||
if(slot < MAX_GLYPH_SLOT_INDEX)
|
||||
{
|
||||
sLog.outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
|
||||
return;
|
||||
}
|
||||
|
||||
if(uint32 glyph = _player->GetGlyph(slot))
|
||||
{
|
||||
if(GlyphPropertiesEntry const *gp = sGlyphPropertiesStore.LookupEntry(glyph))
|
||||
{
|
||||
_player->RemoveAurasDueToSpell(gp->SpellId);
|
||||
_player->SetGlyph(slot, 0);
|
||||
_player->SendTalentsInfoData(false);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
sLog.outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
|
||||
}
|
||||
|
||||
void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
|
|
@ -1316,3 +1322,9 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
|||
data << uint8(facialHair);
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("CMSG_EQUIPMENT_SET_SAVE");
|
||||
recv_data.hexlike();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1238,13 +1238,13 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
|||
/*0x4B9*/ { "UMSG_UNKNOWN_1209", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x4BA*/ { "CMSG_UNKNOWN_1210", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x4BB*/ { "SMSG_UNKNOWN_1211", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x4BC*/ { "SMSG_UNKNOWN_1212", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x4BD*/ { "CMSG_UNKNOWN_1213", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x4BC*/ { "SMSG_EQUIPMENT_SET_LIST", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x4BD*/ { "CMSG_EQUIPMENT_SET_SAVE", STATUS_LOGGEDIN, &WorldSession::HandleEquipmentSetSave },
|
||||
/*0x4BE*/ { "CMSG_UNKNOWN_1214", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x4BF*/ { "SMSG_UNKNOWN_1215", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x4C0*/ { "SMSG_UNKNOWN_1216", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x4C1*/ { "CMSG_UNKNOWN_1217", STATUS_LOGGEDIN, &WorldSession::HandleLearnPreviewTalents },
|
||||
/*0x4C2*/ { "CMSG_UNKNOWN_1218", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x4C0*/ { "SMSG_TALENTS_INFO", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x4C1*/ { "CMSG_LEARN_PREVIEW_TALENTS", STATUS_LOGGEDIN, &WorldSession::HandleLearnPreviewTalents },
|
||||
/*0x4C2*/ { "CMSG_LEARN_PREVIEW_TALENTS_PET", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x4C3*/ { "UMSG_UNKNOWN_1219", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x4C4*/ { "UMSG_UNKNOWN_1220", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x4C5*/ { "UMSG_UNKNOWN_1221", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
|
|
|
|||
|
|
@ -1246,13 +1246,13 @@ enum Opcodes
|
|||
UMSG_UNKNOWN_1209 = 0x4B9, // not found
|
||||
CMSG_UNKNOWN_1210 = 0x4BA, // CMSG, uint64, lua: CalendarContextEventSignUp
|
||||
SMSG_UNKNOWN_1211 = 0x4BB, // SMSG, calendar related
|
||||
SMSG_UNKNOWN_1212 = 0x4BC, // SMSG, equipment manager list?
|
||||
CMSG_UNKNOWN_1213 = 0x4BD, // CMSG, lua: SaveEquipmentSet
|
||||
SMSG_EQUIPMENT_SET_LIST = 0x4BC, // SMSG, equipment manager list?
|
||||
CMSG_EQUIPMENT_SET_SAVE = 0x4BD, // CMSG, lua: SaveEquipmentSet
|
||||
CMSG_UNKNOWN_1214 = 0x4BE, // CMSG, missle?
|
||||
SMSG_UNKNOWN_1215 = 0x4BF, // SMSG, uint64, uint8, 3 x float
|
||||
SMSG_UNKNOWN_1216 = 0x4C0, // SMSG, talents related
|
||||
CMSG_UNKNOWN_1217 = 0x4C1, // CMSG, lua: LearnPreviewTalents (for player?)
|
||||
CMSG_UNKNOWN_1218 = 0x4C2, // CMSG, lua: LearnPreviewTalents (for pet?)
|
||||
SMSG_TALENTS_INFO = 0x4C0, // SMSG, talents related
|
||||
CMSG_LEARN_PREVIEW_TALENTS = 0x4C1, // CMSG, lua: LearnPreviewTalents (for player?)
|
||||
CMSG_LEARN_PREVIEW_TALENTS_PET = 0x4C2, // CMSG, lua: LearnPreviewTalents (for pet?)
|
||||
UMSG_UNKNOWN_1219 = 0x4C3, // not found
|
||||
UMSG_UNKNOWN_1220 = 0x4C4, // not found
|
||||
UMSG_UNKNOWN_1221 = 0x4C5, // not found
|
||||
|
|
|
|||
|
|
@ -14738,7 +14738,7 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
|||
|
||||
void Player::_LoadGlyphAuras()
|
||||
{
|
||||
for (uint8 i = 0; i <= MAX_GLYPH_SLOT_INDEX; ++i)
|
||||
for (uint8 i = 0; i < MAX_GLYPH_SLOT_INDEX; ++i)
|
||||
{
|
||||
if (uint32 glyph = GetGlyph(i))
|
||||
{
|
||||
|
|
@ -18073,6 +18073,8 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||
data << uint32(0); // unknown, may be rest state time or experience
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
GetSocial()->SendSocialList();
|
||||
|
||||
// Homebind
|
||||
data.Initialize(SMSG_BINDPOINTUPDATE, 5*4);
|
||||
data << m_homebindX << m_homebindY << m_homebindZ;
|
||||
|
|
@ -18084,12 +18086,12 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||
// SMSG_UPDATE_AURA_DURATION
|
||||
|
||||
// tutorial stuff
|
||||
data.Initialize(SMSG_TUTORIAL_FLAGS, 8*4);
|
||||
/*data.Initialize(SMSG_TUTORIAL_FLAGS, 8*4);
|
||||
for (int i = 0; i < 8; ++i)
|
||||
data << uint32( GetTutorialInt(i) );
|
||||
GetSession()->SendPacket(&data);
|
||||
GetSession()->SendPacket(&data);*/
|
||||
|
||||
SendTalentInfoData(false);
|
||||
SendTalentsInfoData(false);
|
||||
SendInitialSpells();
|
||||
|
||||
data.Initialize(SMSG_SEND_UNLEARN_SPELLS, 4);
|
||||
|
|
@ -18098,11 +18100,23 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||
|
||||
SendInitialActionButtons();
|
||||
SendInitialReputations();
|
||||
SendInitWorldStates();
|
||||
m_achievementMgr.SendAllAchievementData();
|
||||
UpdateZone(GetZoneId());
|
||||
SendInitWorldStates();
|
||||
|
||||
// SMSG_SET_AURA_SINGLE
|
||||
// equipment manager!
|
||||
data.Initialize(SMSG_EQUIPMENT_SET_LIST);
|
||||
data << uint32(0); // count
|
||||
/*for(count)
|
||||
{
|
||||
data << uint8(0); // PGUID, equipment set guid?
|
||||
data << uint32(0); // counter(0,1,...)?
|
||||
data << uint8(0); // string set name
|
||||
data << uint8(0); // string icon name
|
||||
for(uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
data << uint8(0); // item GUID?
|
||||
}*/
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
data.Initialize(SMSG_LOGIN_SETTIMESPEED, 8);
|
||||
data << uint32(secsToTimeBitFields(sWorld.GetGameTime()));
|
||||
|
|
@ -19686,9 +19700,9 @@ void Player::BuildPetTalentsInfoData(WorldPacket *data)
|
|||
}*/
|
||||
}
|
||||
|
||||
void Player::SendTalentInfoData(bool pet)
|
||||
void Player::SendTalentsInfoData(bool pet)
|
||||
{
|
||||
WorldPacket data(SMSG_UNKNOWN_1216, 50);
|
||||
WorldPacket data(SMSG_TALENTS_INFO, 50);
|
||||
data << uint8(pet);
|
||||
if(pet)
|
||||
BuildPetTalentsInfoData(&data);
|
||||
|
|
|
|||
|
|
@ -1463,7 +1463,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
void InitTalentForLevel();
|
||||
void BuildPlayerTalentsInfoData(WorldPacket *data);
|
||||
void BuildPetTalentsInfoData(WorldPacket *data);
|
||||
void SendTalentInfoData(bool pet);
|
||||
void SendTalentsInfoData(bool pet);
|
||||
void LearnTalent(uint32 talentId, uint32 talentRank);
|
||||
void LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ void WorldSession::SendNameQueryOpcode(Player *p)
|
|||
|
||||
// guess size
|
||||
WorldPacket data( SMSG_NAME_QUERY_RESPONSE, (8+1+1+1+1+1+10) );
|
||||
data << uint64(p->GetGUID()); // player guid
|
||||
data.append(p->GetPackGUID()); // player guid
|
||||
data << uint8(0); // added in 3.1
|
||||
data << p->GetName(); // played name
|
||||
data << uint8(0); // realm name for cross realm BG usage
|
||||
|
|
@ -100,7 +100,7 @@ void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult *result, uint32
|
|||
|
||||
// guess size
|
||||
WorldPacket data( SMSG_NAME_QUERY_RESPONSE, (8+1+1+1+1+1+1+10) );
|
||||
data << uint64(MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER));
|
||||
data.appendPackGUID(MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER));
|
||||
data << uint8(0); // added in 3.1
|
||||
data << name;
|
||||
data << uint8(0);
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ enum ItemQualities
|
|||
#define SPELL_ATTR_EX6_UNK30 0x40000000 // 30 not set in 3.0.3
|
||||
#define SPELL_ATTR_EX6_UNK31 0x80000000 // 31 not set in 3.0.3
|
||||
|
||||
#define MAX_GLYPH_SLOT_INDEX 5
|
||||
#define MAX_GLYPH_SLOT_INDEX 6
|
||||
|
||||
enum SheathTypes
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ void WorldSession::HandleLearnTalentOpcode( WorldPacket & recv_data )
|
|||
recv_data >> talent_id >> requested_rank;
|
||||
|
||||
_player->LearnTalent(talent_id, requested_rank);
|
||||
_player->SendTalentInfoData(false);
|
||||
_player->SendTalentsInfoData(false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
|
||||
|
|
@ -59,7 +59,7 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
|
|||
_player->LearnTalent(talentId, talentRank);
|
||||
}
|
||||
|
||||
_player->SendTalentInfoData(false);
|
||||
_player->SendTalentsInfoData(false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTalentWipeOpcode( WorldPacket & recv_data )
|
||||
|
|
@ -90,6 +90,7 @@ void WorldSession::HandleTalentWipeOpcode( WorldPacket & recv_data )
|
|||
return;
|
||||
}
|
||||
|
||||
_player->SendTalentsInfoData(false);
|
||||
unit->CastSpell(_player, 14867, true); //spell: "Untalent Visual Effect"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5353,16 +5353,6 @@ void Spell::EffectApplyGlyph(uint32 i)
|
|||
|
||||
Player *player = (Player*)m_caster;
|
||||
|
||||
// remove old glyph
|
||||
if(uint32 oldglyph = player->GetGlyph(m_glyphIndex))
|
||||
{
|
||||
if(GlyphPropertiesEntry const *old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph))
|
||||
{
|
||||
player->RemoveAurasDueToSpell(old_gp->SpellId);
|
||||
player->SetGlyph(m_glyphIndex, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// apply new one
|
||||
if(uint32 glyph = m_spellInfo->EffectMiscValue[i])
|
||||
{
|
||||
|
|
@ -5377,9 +5367,19 @@ void Spell::EffectApplyGlyph(uint32 i)
|
|||
}
|
||||
}
|
||||
|
||||
// remove old glyph
|
||||
if(uint32 oldglyph = player->GetGlyph(m_glyphIndex))
|
||||
{
|
||||
if(GlyphPropertiesEntry const *old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph))
|
||||
{
|
||||
player->RemoveAurasDueToSpell(old_gp->SpellId);
|
||||
player->SetGlyph(m_glyphIndex, 0);
|
||||
}
|
||||
}
|
||||
|
||||
player->CastSpell(m_caster, gp->SpellId, true);
|
||||
player->SetGlyph(m_glyphIndex, glyph);
|
||||
player->SendTalentInfoData(false);
|
||||
player->SendTalentsInfoData(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -671,6 +671,7 @@ class MANGOS_DLL_SPEC WorldSession
|
|||
void HandleRemoveGlyph(WorldPacket& recv_data);
|
||||
void HandleCharCustomize(WorldPacket& recv_data);
|
||||
void HandleInspectAchievements(WorldPacket& recv_data);
|
||||
void HandleEquipmentSetSave(WorldPacket& recv_data);
|
||||
private:
|
||||
// private trade methods
|
||||
void moveItems(Item* myItems[], Item* hisItems[]);
|
||||
|
|
|
|||
|
|
@ -996,6 +996,12 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
|
|||
if (sAddOnHandler.BuildAddonPacket (&recvPacket, &SendAddonPacked))
|
||||
SendPacket (SendAddonPacked);
|
||||
|
||||
// TODO: fix it!
|
||||
WorldPacket data(SMSG_TUTORIAL_FLAGS, 4*8);
|
||||
for(uint32 i = 0; i < 8; ++i)
|
||||
data << uint32(-1);
|
||||
SendPacket(data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue