aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/AddonHandler.cpp65
-rw-r--r--src/game/ArenaTeam.cpp29
-rw-r--r--src/game/CalendarHandler.cpp6
-rw-r--r--src/game/GossipDef.cpp9
-rw-r--r--src/game/Opcodes.cpp7
-rw-r--r--src/game/Opcodes.h9
-rw-r--r--src/game/Spell.cpp26
-rw-r--r--src/realmd/AuthCodes.h4
-rw-r--r--src/shared/Database/DBCStores.cpp23
-rw-r--r--src/shared/revision.h4
10 files changed, 119 insertions, 63 deletions
diff --git a/src/game/AddonHandler.cpp b/src/game/AddonHandler.cpp
index 74bb4d9d6bc..37fd719253f 100644
--- a/src/game/AddonHandler.cpp
+++ b/src/game/AddonHandler.cpp
@@ -66,63 +66,84 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target)
if (Source->rpos() + 4 > Source->size())
return false;
- *Source >> TempValue; //get real size of the packed structure
+ *Source >> TempValue; // get real size of the packed structure
// empty addon packet, nothing process, can't be received from real client
if(!TempValue)
return false;
- AddonRealSize = TempValue; //temp value because ZLIB only excepts uLongf
+ AddonRealSize = TempValue; // temp value because ZLIB only excepts uLongf
- CurrentPosition = Source->rpos(); //get the position of the pointer in the structure
+ CurrentPosition = Source->rpos(); // get the position of the pointer in the structure
- AddOnPacked.resize(AddonRealSize); //resize target for zlib action
+ AddOnPacked.resize(AddonRealSize); // resize target for zlib action
if (!uncompress(const_cast<uint8*>(AddOnPacked.contents()), &AddonRealSize, const_cast<uint8*>((*Source).contents() + CurrentPosition), (*Source).size() - CurrentPosition)!= Z_OK)
{
Target->Initialize(SMSG_ADDON_INFO);
- while(AddOnPacked.rpos() < AddOnPacked.size())
+ uint32 addonsCount;
+ AddOnPacked >> addonsCount; // addons count?
+
+ for(uint32 i = 0; i < addonsCount; ++i)
{
- std::string AddonNames;
- uint8 unk6;
- uint32 crc, unk7;
+ std::string addonName;
+ uint8 enabled;
+ uint32 crc, unk2;
// check next addon data format correctness
- if(AddOnPacked.rpos()+1+4+4+1 > AddOnPacked.size())
+ if(AddOnPacked.rpos()+1 > AddOnPacked.size())
return false;
- AddOnPacked >> AddonNames;
+ AddOnPacked >> addonName;
// recheck next addon data format correctness
- if(AddOnPacked.rpos()+4+4+1 > AddOnPacked.size())
+ if(AddOnPacked.rpos()+1+4+4 > AddOnPacked.size())
return false;
- AddOnPacked >> crc >> unk7 >> unk6;
+ AddOnPacked >> enabled >> crc >> unk2;
- //sLog.outDebug("ADDON: Name:%s CRC:%x Unknown1 :%x Unknown2 :%x", AddonNames.c_str(), crc, unk7, unk6);
+ sLog.outDebug("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk2);
- *Target << (uint8)2;
+ uint8 state = (enabled ? 2 : 1);
+ *Target << uint8(state);
- uint8 unk1 = 1;
- *Target << (uint8)unk1;
+ uint8 unk1 = (enabled ? 1 : 0);
+ *Target << uint8(unk1);
if (unk1)
{
- uint8 unk2 = crc != 0x1c776d01LL; //If addon is Standard addon CRC
- *Target << (uint8)unk2;
+ uint8 unk2 = (crc != 0x4c1c776d); // If addon is Standard addon CRC
+ *Target << uint8(unk2);
if (unk2)
Target->append(tdata, sizeof(tdata));
- *Target << (uint32)0;
+ *Target << uint32(0);
}
- uint8 unk3 = 0;
- *Target << (uint8)unk3;
+ uint8 unk3 = (enabled ? 0 : 1);
+ *Target << uint8(unk3);
if (unk3)
{
- // String, 256
+ // String, 256 (null terminated?)
+ *Target << uint8(0);
}
}
+
+ uint32 unk4;
+ AddOnPacked >> unk4;
+
+ uint32 count = 0;
+ *Target << uint32(count);
+ /*for(uint32 i = 0; i < count; ++i)
+ {
+ uint32
+ string (16 bytes)
+ string (16 bytes)
+ uint32
+ }*/
+
+ if(AddOnPacked.rpos() != AddOnPacked.size())
+ sLog.outDebug("packet under read!");
}
else
{
diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp
index 5f1dfdb93d7..3d7b9146b02 100644
--- a/src/game/ArenaTeam.cpp
+++ b/src/game/ArenaTeam.cpp
@@ -304,8 +304,11 @@ void ArenaTeam::Roster(WorldSession *session)
{
Player *pl = NULL;
+ uint8 unk308 = 0;
+
WorldPacket data(SMSG_ARENA_TEAM_ROSTER, 100);
data << uint32(GetId()); // arena team id
+ data << uint8(unk308); // 308 unknown value but affect packet structure
data << uint32(GetMembersSize()); // members count
data << uint32(GetType()); // arena team type?
@@ -313,18 +316,24 @@ void ArenaTeam::Roster(WorldSession *session)
{
pl = objmgr.GetPlayer(itr->guid);
- data << uint64(itr->guid); // guid
- data << uint8((pl ? 1 : 0)); // online flag
- data << itr->name; // member name
+ data << uint64(itr->guid); // guid
+ data << uint8((pl ? 1 : 0)); // online flag
+ data << itr->name; // member name
data << uint32((itr->guid == GetCaptain() ? 0 : 1));// captain flag 0 captain 1 member
- data << uint8((pl ? pl->getLevel() : 0)); // unknown, level?
- data << uint8(itr->Class); // class
- data << uint32(itr->games_week); // played this week
- data << uint32(itr->wins_week); // wins this week
- data << uint32(itr->games_season); // played this season
- data << uint32(itr->wins_season); // wins this season
- data << uint32(itr->personal_rating); // personal rating
+ data << uint8((pl ? pl->getLevel() : 0)); // unknown, level?
+ data << uint8(itr->Class); // class
+ data << uint32(itr->games_week); // played this week
+ data << uint32(itr->wins_week); // wins this week
+ data << uint32(itr->games_season); // played this season
+ data << uint32(itr->wins_season); // wins this season
+ data << uint32(itr->personal_rating); // personal rating
+ if(unk308)
+ {
+ data << float(0.0); // 308 unk
+ data << float(0.0); // 308 unk
+ }
}
+
session->SendPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_ROSTER");
}
diff --git a/src/game/CalendarHandler.cpp b/src/game/CalendarHandler.cpp
index 6b1484bcbab..9d1171687b6 100644
--- a/src/game/CalendarHandler.cpp
+++ b/src/game/CalendarHandler.cpp
@@ -24,8 +24,6 @@
#include "Opcodes.h"
#include "InstanceSaveMgr.h"
-
-
void WorldSession::HandleCalendarGetCalendar(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR");
@@ -65,7 +63,9 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket &recv_data)
data.put<uint32>(p_counter,counter);
data << (uint32) 1135753200; //wtf?? (28.12.2005 12:00)
- sLog.outDebug("Sending calendar");
+ data << (uint32) 0; // unk counter 4
+ data << (uint32) 0; // unk counter 5
+ //sLog.outDebug("Sending calendar");
//data.hexlike();
SendPacket(&data);
}
diff --git a/src/game/GossipDef.cpp b/src/game/GossipDef.cpp
index 7feeb195607..8b6c8209233 100644
--- a/src/game/GossipDef.cpp
+++ b/src/game/GossipDef.cpp
@@ -595,11 +595,18 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
data << uint32(pQuest->ReqCreatureOrGOId[iI]);
}
data << uint32(pQuest->ReqCreatureOrGOCount[iI]);
+ data << uint32(0); // added in WotLK, dunno if offset if correct
+ }
+
+ for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; ++iI)
+ {
data << uint32(pQuest->ReqItemId[iI]);
data << uint32(pQuest->ReqItemCount[iI]);
- data << uint32(0); // added in WotLK, dunno if offset if correct
}
+ data << uint32(0); // TODO: 5 item objective
+ data << uint32(0);
+
for (iI = 0; iI < QUEST_OBJECTIVES_COUNT; iI++)
data << ObjectiveText[iI];
diff --git a/src/game/Opcodes.cpp b/src/game/Opcodes.cpp
index 9ed1ba4496c..8cc987545eb 100644
--- a/src/game/Opcodes.cpp
+++ b/src/game/Opcodes.cpp
@@ -1218,4 +1218,11 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x4A3*/ { "SMSG_SERVER_BUCK_DATA_START", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x4A4*/ { "CMSG_QUERY_VEHICLE_STATUS", STATUS_NEVER, &WorldSession::Handle_NULL },
/*0x4A5*/ { "SMSG_PET_GUIDS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x4A6*/ { "SMSG_CLIENTCACHE_VERSION", STATUS_NEVER, &WorldSession::Handle_ServerSide },
+ /*0x4A7*/ { "UMSG_UNKNOWN_1191", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x4A8*/ { "UMSG_UNKNOWN_1192", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x4A9*/ { "UMSG_UNKNOWN_1193", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x4AA*/ { "UMSG_UNKNOWN_1194", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x4AB*/ { "UMSG_UNKNOWN_1195", STATUS_NEVER, &WorldSession::Handle_NULL },
+ /*0x4AC*/ { "UMSG_UNKNOWN_1196", STATUS_NEVER, &WorldSession::Handle_NULL },
};
diff --git a/src/game/Opcodes.h b/src/game/Opcodes.h
index 7bc3a7c0640..f4d7800d2d9 100644
--- a/src/game/Opcodes.h
+++ b/src/game/Opcodes.h
@@ -1226,7 +1226,14 @@ enum Opcodes
SMSG_SERVER_BUCK_DATA_START = 0x4A3,
CMSG_QUERY_VEHICLE_STATUS = 0x4A4,
SMSG_PET_GUIDS = 0x4A5,
- NUM_MSG_TYPES = 0x4A6
+ SMSG_CLIENTCACHE_VERSION = 0x4A6,
+ UMSG_UNKNOWN_1191 = 0x4A7,
+ UMSG_UNKNOWN_1192 = 0x4A8,
+ UMSG_UNKNOWN_1193 = 0x4A9,
+ UMSG_UNKNOWN_1194 = 0x4AA,
+ UMSG_UNKNOWN_1195 = 0x4AB,
+ UMSG_UNKNOWN_1196 = 0x4AC,
+ NUM_MSG_TYPES = 0x4AD
};
/// Player state
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 852c7943612..3890f97dd9c 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -189,7 +189,7 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
if(!data->readPackGUID(m_unitTargetGUID))
return false;
- if( m_targetMask & ( TARGET_FLAG_OBJECT | TARGET_FLAG_OBJECT_UNK ))
+ if( m_targetMask & ( TARGET_FLAG_OBJECT ))
if(!data->readPackGUID(m_GOTargetGUID))
return false;
@@ -197,6 +197,10 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
if(!data->readPackGUID(m_itemTargetGUID))
return false;
+ if( m_targetMask & (TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE ) )
+ if(!data->readPackGUID(m_CorpseTargetGUID))
+ return false;
+
/*if( m_targetMask & TARGET_FLAG_SOURCE_LOCATION )
{
if(data->rpos()+4+4+4 > data->size())
@@ -209,7 +213,10 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
if( m_targetMask & (TARGET_FLAG_SOURCE_LOCATION | TARGET_FLAG_DEST_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;
*data >> m_destX >> m_destY >> m_destZ;
@@ -226,10 +233,6 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
*data >> m_strTarget;
}
- if( m_targetMask & (TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE ) )
- if(!data->readPackGUID(m_CorpseTargetGUID))
- return false;
-
// find real units/GOs
Update(caster);
return true;
@@ -240,7 +243,7 @@ void SpellCastTargets::write ( WorldPacket * data )
*data << uint32(m_targetMask);
sLog.outDebug("Spell write, target mask = %u", m_targetMask);
- if( m_targetMask & ( TARGET_FLAG_UNIT | TARGET_FLAG_PVP_CORPSE | TARGET_FLAG_OBJECT | TARGET_FLAG_OBJECT_UNK | TARGET_FLAG_CORPSE | TARGET_FLAG_UNK2 ) )
+ if( m_targetMask & ( TARGET_FLAG_UNIT | TARGET_FLAG_PVP_CORPSE | TARGET_FLAG_OBJECT | TARGET_FLAG_CORPSE | TARGET_FLAG_UNK2 ) )
{
if(m_targetMask & TARGET_FLAG_UNIT)
{
@@ -249,7 +252,7 @@ void SpellCastTargets::write ( WorldPacket * data )
else
*data << uint8(0);
}
- else if( m_targetMask & ( TARGET_FLAG_OBJECT | TARGET_FLAG_OBJECT_UNK ) )
+ else if( m_targetMask & TARGET_FLAG_OBJECT )
{
if(m_GOTarget)
data->append(m_GOTarget->GetPackGUID());
@@ -274,7 +277,14 @@ void SpellCastTargets::write ( WorldPacket * data )
*data << m_srcX << m_srcY << m_srcZ;
if( m_targetMask & TARGET_FLAG_DEST_LOCATION )
+ {
+ if(m_unitTarget)
+ data->append(m_unitTarget->GetPackGUID());
+ else
+ *data << uint8(0);
+
*data << m_destX << m_destY << m_destZ;
+ }
if( m_targetMask & TARGET_FLAG_STRING )
*data << m_strTarget;
diff --git a/src/realmd/AuthCodes.h b/src/realmd/AuthCodes.h
index f322d7fea17..0a454117477 100644
--- a/src/realmd/AuthCodes.h
+++ b/src/realmd/AuthCodes.h
@@ -68,8 +68,8 @@ enum LoginResult
// we need to stick to 1 version or half of the stuff will work for someone
// others will not and opposite
-// will only support WoW, WoW:TBC and WoW:WotLK 3.0.3 client build 9183...
+// will only support WoW, WoW:TBC and WoW:WotLK 3.0.8 client build 9506...
-#define EXPECTED_TRINITY_CLIENT_BUILD {9183, 0}
+#define EXPECTED_TRINITY_CLIENT_BUILD {9506, 0}
#endif
diff --git a/src/shared/Database/DBCStores.cpp b/src/shared/Database/DBCStores.cpp
index b9515713e8e..5d8d1720542 100644
--- a/src/shared/Database/DBCStores.cpp
+++ b/src/shared/Database/DBCStores.cpp
@@ -500,20 +500,15 @@ void LoadDBCStores(const std::string& dataPath)
exit(1);
}
- // check at up-to-date DBC files (54909 is last added spell in 3.0.1)
- // check at up-to-date DBC files (19162 is last added spell in abilities in 3.0.1)
- // check at up-to-date DBC files (619 is last map added in 3.0.1)
- // check at up-to-date DBC files (1361 is last gem property added in 3.0.1)
- // check at up-to-date DBC files (2425 is last item extended cost added in 3.0.1)
- // check at up-to-date DBC files (76 is last char title added in 3.0.1)
- // check at up-to-date DBC files (2311 is last area added in 3.0.1)
- if( !sSpellStore.LookupEntry(54909) ||
- !sSkillLineAbilityStore.LookupEntry(19162) ||
- !sMapStore.LookupEntry(619) ||
- !sGemPropertiesStore.LookupEntry(1361) ||
- !sItemExtendedCostStore.LookupEntry(2425) ||
- !sCharTitlesStore.LookupEntry(76) ||
- !sAreaStore.LookupEntry(2311) )
+ // Check loaded DBC files proper version
+ if( !sSpellStore.LookupEntry(54909) || // last added spell in 3.0.8a
+ !sSpellStore.LookupEntry(49184) || // last added spell in 3.0.8a
+ sSpellStore.LookupEntry(49184)->RecoveryTime!=5000||// last changed spell in 3.0.8a
+ !sMapStore.LookupEntry(624) || // last map added in 3.0.8a
+ !sGemPropertiesStore.LookupEntry(1557) || // last gem property added in 3.0.8a
+ !sItemExtendedCostStore.LookupEntry(2589) || // last item extended cost added in 3.0.8a
+ !sCharTitlesStore.LookupEntry(144) || // last char title added in 3.0.8a
+ !sAreaStore.LookupEntry(2769) ) // last area (areaflag) added in 3.0.8a
{
sLog.outError("\nYou have _outdated_ DBC files. Please extract correct versions from current using client.");
exit(1);
diff --git a/src/shared/revision.h b/src/shared/revision.h
index e60dcfdb657..b31e2fecc8a 100644
--- a/src/shared/revision.h
+++ b/src/shared/revision.h
@@ -1,7 +1,7 @@
#ifndef __REVISION_H__
#define __REVISION_H__
- #define _REVISION "1116"
- #define _HASH "81edc7393bc6"
+ #define _REVISION "1119"
+ #define _HASH "93443aefdbe5"
#define _REVISION_DATE "*"
#define _REVISION_TIME "*"
#endif // __REVISION_H__