[9721] Updated high guids. Renamed few files. Added some comments.

This commit is contained in:
tomrus88 2010-04-10 16:57:46 +04:00
parent 8f18a0d920
commit dc1bb13c72
12 changed files with 63 additions and 55 deletions

View file

@ -25,7 +25,7 @@
Bag::Bag( ): Item() Bag::Bag( ): Item()
{ {
m_objectType |= TYPEMASK_CONTAINER; m_objectType |= (TYPEMASK_ITEM | TYPEMASK_CONTAINER);
m_objectTypeId = TYPEID_CONTAINER; m_objectTypeId = TYPEID_CONTAINER;
m_valuesCount = CONTAINER_END; m_valuesCount = CONTAINER_END;

View file

@ -32,7 +32,7 @@
#include "BattleGroundDS.h" #include "BattleGroundDS.h"
#include "BattleGroundRV.h" #include "BattleGroundRV.h"
#include "BattleGroundIC.h" #include "BattleGroundIC.h"
#include "BattleGroundABG.h" #include "BattleGroundRB.h"
#include "MapManager.h" #include "MapManager.h"
#include "Map.h" #include "Map.h"
#include "MapInstanced.h" #include "MapInstanced.h"
@ -1528,7 +1528,7 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI
bg = new BattleGroundIC(*(BattleGroundIC*)bg_template); bg = new BattleGroundIC(*(BattleGroundIC*)bg_template);
break; break;
case BATTLEGROUND_RB: case BATTLEGROUND_RB:
bg = new BattleGroundABG(*(BattleGroundABG*)bg_template); bg = new BattleGroundRB(*(BattleGroundRB*)bg_template);
break; break;
default: default:
//error, but it is handled few lines above //error, but it is handled few lines above
@ -1571,7 +1571,7 @@ uint32 BattleGroundMgr::CreateBattleGround(BattleGroundTypeId bgTypeId, bool IsA
case BATTLEGROUND_DS: bg = new BattleGroundDS; break; case BATTLEGROUND_DS: bg = new BattleGroundDS; break;
case BATTLEGROUND_RV: bg = new BattleGroundRV; break; case BATTLEGROUND_RV: bg = new BattleGroundRV; break;
case BATTLEGROUND_IC: bg = new BattleGroundIC; break; case BATTLEGROUND_IC: bg = new BattleGroundIC; break;
case BATTLEGROUND_RB: bg = new BattleGroundABG; break; case BATTLEGROUND_RB: bg = new BattleGroundRB; break;
default:bg = new BattleGround; break; // placeholder for non implemented BG default:bg = new BattleGround; break; // placeholder for non implemented BG
} }
@ -1643,19 +1643,26 @@ void BattleGroundMgr::CreateInitialBattleGrounds()
MaxPlayersPerTeam = fields[2].GetUInt32(); MaxPlayersPerTeam = fields[2].GetUInt32();
MinLvl = fields[3].GetUInt32(); MinLvl = fields[3].GetUInt32();
MaxLvl = fields[4].GetUInt32(); MaxLvl = fields[4].GetUInt32();
//check values from DB //check values from DB
if (MaxPlayersPerTeam == 0 || MinPlayersPerTeam == 0 || MinPlayersPerTeam > MaxPlayersPerTeam) if (MaxPlayersPerTeam == 0 || MinPlayersPerTeam == 0)
{ {
MinPlayersPerTeam = 0; // by default now expected strong full bg requirement sLog.outErrorDb("Table `battleground_template` for id %u have wrong min/max players per team settings. BG not created.", bgTypeID);
MaxPlayersPerTeam = 40; continue;
} }
if (MinLvl == 0 || MaxLvl == 0 || MinLvl > MaxLvl)
if (MinPlayersPerTeam > MaxPlayersPerTeam)
MinPlayersPerTeam = MaxPlayersPerTeam;
if (MinLvl == 0 || MaxLvl == 0)
{ {
// TODO: fix me sLog.outErrorDb("Table `battleground_template` for id %u have wrong min/max level settings. BG not created.", bgTypeID);
MinLvl = 0;//bl->minlvl; continue;
MaxLvl = 80;//bl->maxlvl;
} }
if (MinLvl > MaxLvl)
MinLvl = MaxLvl;
start1 = fields[5].GetUInt32(); start1 = fields[5].GetUInt32();
start = sWorldSafeLocsStore.LookupEntry(start1); start = sWorldSafeLocsStore.LookupEntry(start1);

View file

@ -18,10 +18,10 @@
#include "Player.h" #include "Player.h"
#include "BattleGround.h" #include "BattleGround.h"
#include "BattleGroundABG.h" #include "BattleGroundRB.h"
#include "Language.h" #include "Language.h"
BattleGroundABG::BattleGroundABG() BattleGroundRB::BattleGroundRB()
{ {
//TODO FIX ME! //TODO FIX ME!
m_StartMessageIds[BG_STARTING_EVENT_FIRST] = 0; m_StartMessageIds[BG_STARTING_EVENT_FIRST] = 0;
@ -30,25 +30,25 @@ BattleGroundABG::BattleGroundABG()
m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN; m_StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_WS_HAS_BEGUN;
} }
BattleGroundABG::~BattleGroundABG() BattleGroundRB::~BattleGroundRB()
{ {
} }
void BattleGroundABG::Update(uint32 diff) void BattleGroundRB::Update(uint32 diff)
{ {
BattleGround::Update(diff); BattleGround::Update(diff);
} }
void BattleGroundABG::StartingEventCloseDoors() void BattleGroundRB::StartingEventCloseDoors()
{ {
} }
void BattleGroundABG::StartingEventOpenDoors() void BattleGroundRB::StartingEventOpenDoors()
{ {
} }
void BattleGroundABG::AddPlayer(Player *plr) void BattleGroundRB::AddPlayer(Player *plr)
{ {
BattleGround::AddPlayer(plr); BattleGround::AddPlayer(plr);
//create score and add it to map, default values are set in constructor //create score and add it to map, default values are set in constructor
@ -57,19 +57,19 @@ void BattleGroundABG::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc; m_PlayerScores[plr->GetGUID()] = sc;
} }
void BattleGroundABG::RemovePlayer(Player* /*plr*/,uint64 /*guid*/) void BattleGroundRB::RemovePlayer(Player* /*plr*/,uint64 /*guid*/)
{ {
} }
void BattleGroundABG::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/) void BattleGroundRB::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/)
{ {
// this is wrong way to implement these things. On official it done by gameobject spell cast. // this is wrong way to implement these things. On official it done by gameobject spell cast.
if (GetStatus() != STATUS_IN_PROGRESS) if (GetStatus() != STATUS_IN_PROGRESS)
return; return;
} }
void BattleGroundABG::UpdatePlayerScore(Player* Source, uint32 type, uint32 value) void BattleGroundRB::UpdatePlayerScore(Player* Source, uint32 type, uint32 value)
{ {
std::map<uint64, BattleGroundScore*>::iterator itr = m_PlayerScores.find(Source->GetGUID()); std::map<uint64, BattleGroundScore*>::iterator itr = m_PlayerScores.find(Source->GetGUID());

View file

@ -28,13 +28,13 @@ class BattleGroundABGScore : public BattleGroundScore
virtual ~BattleGroundABGScore() {}; virtual ~BattleGroundABGScore() {};
}; };
class BattleGroundABG : public BattleGround class BattleGroundRB : public BattleGround
{ {
friend class BattleGroundMgr; friend class BattleGroundMgr;
public: public:
BattleGroundABG(); BattleGroundRB();
~BattleGroundABG(); ~BattleGroundRB();
void Update(uint32 diff); void Update(uint32 diff);
/* inherited from BattlegroundClass */ /* inherited from BattlegroundClass */

View file

@ -107,19 +107,20 @@ enum ITEM_FLAGS
ITEM_FLAGS_BINDED = 0x00000001, // set in game at binding, not set in template ITEM_FLAGS_BINDED = 0x00000001, // set in game at binding, not set in template
ITEM_FLAGS_CONJURED = 0x00000002, ITEM_FLAGS_CONJURED = 0x00000002,
ITEM_FLAGS_OPENABLE = 0x00000004, ITEM_FLAGS_OPENABLE = 0x00000004,
ITEM_FLAGS_WRAPPED = 0x00000008, ITEM_FLAGS_WRAPPED = 0x00000008, // conflicts with heroic flag
ITEM_FLAGS_HEROIC = 0x00000008, // weird... ITEM_FLAGS_HEROIC = 0x00000008, // weird...
ITEM_FLAGS_BROKEN = 0x00000010, // appears red icon (like when item durability==0) ITEM_FLAGS_BROKEN = 0x00000010, // appears red icon (like when item durability==0)
ITEM_FLAGS_TOTEM = 0x00000020, // ? ITEM_FLAGS_UNK2 = 0x00000020, // saw this on item 43012, 43013, 46377, 52021...
ITEM_FLAGS_USABLE = 0x00000040, // ? ITEM_FLAGS_USABLE = 0x00000040, // ?
ITEM_FLAGS_NO_EQUIP_COOLDOWN = 0x00000080, // ? ITEM_FLAGS_NO_EQUIP_COOLDOWN = 0x00000080, // ?
ITEM_FLAGS_UNK3 = 0x00000100, // saw this on item 47115, 49295...
ITEM_FLAGS_WRAPPER = 0x00000200, // used or not used wrapper ITEM_FLAGS_WRAPPER = 0x00000200, // used or not used wrapper
ITEM_FLAGS_IGNORE_BAG_SPACE = 0x00000400, // ignore bag space at new item creation? ITEM_FLAGS_IGNORE_BAG_SPACE = 0x00000400, // ignore bag space at new item creation?
ITEM_FLAGS_PARTY_LOOT = 0x00000800, // determines if item is party loot or not ITEM_FLAGS_PARTY_LOOT = 0x00000800, // determines if item is party loot or not
ITEM_FLAGS_REFUNDABLE = 0x00001000, // item cost can be refunded within 2 hours after purchase ITEM_FLAGS_REFUNDABLE = 0x00001000, // item cost can be refunded within 2 hours after purchase
ITEM_FLAGS_CHARTER = 0x00002000, // arena/guild charter ITEM_FLAGS_CHARTER = 0x00002000, // arena/guild charter
ITEM_FLAGS_REFUNDABLE_2 = 0x00008000, // ? ITEM_FLAGS_UNK4 = 0x00008000, // a lot of items have this
ITEM_FLAGS_UNK1 = 0x00010000, ITEM_FLAGS_UNK1 = 0x00010000, // a lot of items have this
ITEM_FLAGS_PROSPECTABLE = 0x00040000, ITEM_FLAGS_PROSPECTABLE = 0x00040000,
ITEM_FLAGS_UNIQUE_EQUIPPED = 0x00080000, ITEM_FLAGS_UNIQUE_EQUIPPED = 0x00080000,
ITEM_FLAGS_USEABLE_IN_ARENA = 0x00200000, ITEM_FLAGS_USEABLE_IN_ARENA = 0x00200000,

View file

@ -716,7 +716,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data )
bodyItem->SetText(m->body); bodyItem->SetText(m->body);
bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender); bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender);
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPER | ITEM_FLAGS_REFUNDABLE_2 | ITEM_FLAGS_UNK1); bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPER | ITEM_FLAGS_UNK4 | ITEM_FLAGS_UNK1);
sLog.outDetail("HandleMailCreateTextItem mailid=%u", mailId); sLog.outDetail("HandleMailCreateTextItem mailid=%u", mailId);

View file

@ -45,7 +45,7 @@ libmangosgame_a_SOURCES = \
BattleGround.cpp \ BattleGround.cpp \
BattleGroundAA.cpp \ BattleGroundAA.cpp \
BattleGroundAB.cpp \ BattleGroundAB.cpp \
BattleGroundABG.cpp \ BattleGroundRB.cpp \
BattleGroundAV.cpp \ BattleGroundAV.cpp \
BattleGroundBE.cpp \ BattleGroundBE.cpp \
BattleGroundDS.cpp \ BattleGroundDS.cpp \
@ -59,7 +59,7 @@ libmangosgame_a_SOURCES = \
BattleGround.h \ BattleGround.h \
BattleGroundAA.h \ BattleGroundAA.h \
BattleGroundAB.h \ BattleGroundAB.h \
BattleGroundABG.h \ BattleGroundRB.h \
BattleGroundAV.h \ BattleGroundAV.h \
BattleGroundBE.h \ BattleGroundBE.h \
BattleGroundDS.h \ BattleGroundDS.h \

View file

@ -40,7 +40,7 @@ enum TypeMask
{ {
TYPEMASK_OBJECT = 0x0001, TYPEMASK_OBJECT = 0x0001,
TYPEMASK_ITEM = 0x0002, TYPEMASK_ITEM = 0x0002,
TYPEMASK_CONTAINER = 0x0006, // TYPEMASK_ITEM | 0x0004 TYPEMASK_CONTAINER = 0x0004,
TYPEMASK_UNIT = 0x0008, // players also have it TYPEMASK_UNIT = 0x0008, // players also have it
TYPEMASK_PLAYER = 0x0010, TYPEMASK_PLAYER = 0x0010,
TYPEMASK_GAMEOBJECT = 0x0020, TYPEMASK_GAMEOBJECT = 0x0020,
@ -55,16 +55,16 @@ enum TypeMask
enum HighGuid enum HighGuid
{ {
HIGHGUID_ITEM = 0x4000, // blizz 4000 HIGHGUID_ITEM = 0x4700, // blizz 4700
HIGHGUID_CONTAINER = 0x4000, // blizz 4000 HIGHGUID_CONTAINER = 0x4700, // blizz 4700
HIGHGUID_PLAYER = 0x0000, // blizz 0000 HIGHGUID_PLAYER = 0x0700, // blizz 0700
HIGHGUID_GAMEOBJECT = 0xF110, // blizz F110 HIGHGUID_GAMEOBJECT = 0xF110, // blizz F110/F510
HIGHGUID_TRANSPORT = 0xF120, // blizz F120 (for GAMEOBJECT_TYPE_TRANSPORT) HIGHGUID_TRANSPORT = 0xF120, // blizz F120/F520 (for GAMEOBJECT_TYPE_TRANSPORT)
HIGHGUID_UNIT = 0xF130, // blizz F130 HIGHGUID_UNIT = 0xF130, // blizz F130/F530
HIGHGUID_PET = 0xF140, // blizz F140 HIGHGUID_PET = 0xF140, // blizz F140/F540
HIGHGUID_VEHICLE = 0xF150, // blizz F550 HIGHGUID_VEHICLE = 0xF150, // blizz F150/F550
HIGHGUID_DYNAMICOBJECT = 0xF100, // blizz F100 HIGHGUID_DYNAMICOBJECT = 0xF100, // blizz F100/F500
HIGHGUID_CORPSE = 0xF101, // blizz F100 HIGHGUID_CORPSE = 0xF500, // blizz F100/F500 used second variant to resolve conflict with HIGHGUID_DYNAMICOBJECT
HIGHGUID_MO_TRANSPORT = 0x1FC0, // blizz 1FC0 (for GAMEOBJECT_TYPE_MO_TRANSPORT) HIGHGUID_MO_TRANSPORT = 0x1FC0, // blizz 1FC0 (for GAMEOBJECT_TYPE_MO_TRANSPORT)
}; };

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9720" #define REVISION_NR "9721"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__

View file

@ -355,7 +355,7 @@
<ClCompile Include="..\..\src\game\BattleGround.cpp" /> <ClCompile Include="..\..\src\game\BattleGround.cpp" />
<ClCompile Include="..\..\src\game\BattleGroundAA.cpp" /> <ClCompile Include="..\..\src\game\BattleGroundAA.cpp" />
<ClCompile Include="..\..\src\game\BattleGroundAB.cpp" /> <ClCompile Include="..\..\src\game\BattleGroundAB.cpp" />
<ClCompile Include="..\..\src\game\BattleGroundABG.cpp" /> <ClCompile Include="..\..\src\game\BattleGroundRB.cpp" />
<ClCompile Include="..\..\src\game\BattleGroundAV.cpp" /> <ClCompile Include="..\..\src\game\BattleGroundAV.cpp" />
<ClCompile Include="..\..\src\game\BattleGroundBE.cpp" /> <ClCompile Include="..\..\src\game\BattleGroundBE.cpp" />
<ClCompile Include="..\..\src\game\BattleGroundDS.cpp" /> <ClCompile Include="..\..\src\game\BattleGroundDS.cpp" />
@ -502,7 +502,7 @@
<ClInclude Include="..\..\src\game\BattleGround.h" /> <ClInclude Include="..\..\src\game\BattleGround.h" />
<ClInclude Include="..\..\src\game\BattleGroundAA.h" /> <ClInclude Include="..\..\src\game\BattleGroundAA.h" />
<ClInclude Include="..\..\src\game\BattleGroundAB.h" /> <ClInclude Include="..\..\src\game\BattleGroundAB.h" />
<ClInclude Include="..\..\src\game\BattleGroundABG.h" /> <ClInclude Include="..\..\src\game\BattleGroundRB.h" />
<ClInclude Include="..\..\src\game\BattleGroundAV.h" /> <ClInclude Include="..\..\src\game\BattleGroundAV.h" />
<ClInclude Include="..\..\src\game\BattleGroundBE.h" /> <ClInclude Include="..\..\src\game\BattleGroundBE.h" />
<ClInclude Include="..\..\src\game\BattleGroundDS.h" /> <ClInclude Include="..\..\src\game\BattleGroundDS.h" />

View file

@ -566,11 +566,11 @@
> >
</File> </File>
<File <File
RelativePath="..\..\src\game\BattleGroundABG.cpp" RelativePath="..\..\src\game\BattleGroundRB.cpp"
> >
</File> </File>
<File <File
RelativePath="..\..\src\game\BattleGroundABG.h" RelativePath="..\..\src\game\BattleGroundRB.h"
> >
</File> </File>
<File <File

View file

@ -566,14 +566,6 @@
RelativePath="..\..\src\game\BattleGroundAB.h" RelativePath="..\..\src\game\BattleGroundAB.h"
> >
</File> </File>
<File
RelativePath="..\..\src\game\BattleGroundABG.cpp"
>
</File>
<File
RelativePath="..\..\src\game\BattleGroundABG.h"
>
</File>
<File <File
RelativePath="..\..\src\game\BattleGroundAV.cpp" RelativePath="..\..\src\game\BattleGroundAV.cpp"
> >
@ -634,6 +626,14 @@
RelativePath="..\..\src\game\BattleGroundNA.h" RelativePath="..\..\src\game\BattleGroundNA.h"
> >
</File> </File>
<File
RelativePath="..\..\src\game\BattleGroundRB.cpp"
>
</File>
<File
RelativePath="..\..\src\game\BattleGroundRB.h"
>
</File>
<File <File
RelativePath="..\..\src\game\BattleGroundRL.cpp" RelativePath="..\..\src\game\BattleGroundRL.cpp"
> >