mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Implement initial known taxi nodes for DK.
Signed-off-by: VladimirMangos <vladimir@getmangos.com> With some my rewrite.
This commit is contained in:
parent
bfbdb42309
commit
864b0c92b3
3 changed files with 22 additions and 9 deletions
|
|
@ -129,6 +129,7 @@ static uint32 sTalentTabPages[12/*MAX_CLASSES*/][3];
|
||||||
|
|
||||||
DBCStorage <TaxiNodesEntry> sTaxiNodesStore(TaxiNodesEntryfmt);
|
DBCStorage <TaxiNodesEntry> sTaxiNodesStore(TaxiNodesEntryfmt);
|
||||||
TaxiMask sTaxiNodesMask;
|
TaxiMask sTaxiNodesMask;
|
||||||
|
TaxiMask sOldContinentsNodesMask;
|
||||||
|
|
||||||
// DBC used only for initialization sTaxiPathSetBySource at startup.
|
// DBC used only for initialization sTaxiPathSetBySource at startup.
|
||||||
TaxiPathSetBySource sTaxiPathSetBySource;
|
TaxiPathSetBySource sTaxiPathSetBySource;
|
||||||
|
|
@ -454,9 +455,11 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
spellPaths.insert(sInfo->EffectMiscValue[j]);
|
spellPaths.insert(sInfo->EffectMiscValue[j]);
|
||||||
|
|
||||||
memset(sTaxiNodesMask,0,sizeof(sTaxiNodesMask));
|
memset(sTaxiNodesMask,0,sizeof(sTaxiNodesMask));
|
||||||
|
memset(sOldContinentsNodesMask,0,sizeof(sTaxiNodesMask));
|
||||||
for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
|
for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
|
||||||
{
|
{
|
||||||
if(!sTaxiNodesStore.LookupEntry(i))
|
TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
|
||||||
|
if(!node)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TaxiPathSetBySource::const_iterator src_i = sTaxiPathSetBySource.find(i);
|
TaxiPathSetBySource::const_iterator src_i = sTaxiPathSetBySource.find(i);
|
||||||
|
|
@ -477,10 +480,14 @@ void LoadDBCStores(const std::string& dataPath)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// valid taxi netowrk node
|
// valid taxi network node
|
||||||
uint8 field = (uint8)((i - 1) / 32);
|
uint8 field = (uint8)((i - 1) / 32);
|
||||||
uint32 submask = 1<<((i-1)%32);
|
uint32 submask = 1<<((i-1)%32);
|
||||||
sTaxiNodesMask[field] |= submask;
|
sTaxiNodesMask[field] |= submask;
|
||||||
|
|
||||||
|
// old continent node (+ nodes virtually at old continents, check explicitly to avoid loading map files for zone info)
|
||||||
|
if (node->map_id < 2 || i == 82 || i == 83 || i == 93 || i == 94)
|
||||||
|
sOldContinentsNodesMask[field] |= submask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ extern DBCStorage <TalentTabEntry> sTalentTabStore;
|
||||||
extern DBCStorage <TaxiNodesEntry> sTaxiNodesStore;
|
extern DBCStorage <TaxiNodesEntry> sTaxiNodesStore;
|
||||||
extern DBCStorage <TaxiPathEntry> sTaxiPathStore;
|
extern DBCStorage <TaxiPathEntry> sTaxiPathStore;
|
||||||
extern TaxiMask sTaxiNodesMask;
|
extern TaxiMask sTaxiNodesMask;
|
||||||
|
extern TaxiMask sOldContinentsNodesMask;
|
||||||
extern TaxiPathSetBySource sTaxiPathSetBySource;
|
extern TaxiPathSetBySource sTaxiPathSetBySource;
|
||||||
extern TaxiPathNodesByPath sTaxiPathNodesByPath;
|
extern TaxiPathNodesByPath sTaxiPathNodesByPath;
|
||||||
extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
|
extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,18 @@ PlayerTaxi::PlayerTaxi()
|
||||||
|
|
||||||
void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 level)
|
void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 level)
|
||||||
{
|
{
|
||||||
// capital and taxi hub masks
|
// class specific initial known nodes
|
||||||
|
switch(chrClass)
|
||||||
|
{
|
||||||
|
case CLASS_DEATH_KNIGHT:
|
||||||
|
{
|
||||||
|
for(int i = 0; i < TaxiMaskSize; ++i)
|
||||||
|
m_taximask[i] |= sOldContinentsNodesMask[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// race specific initial known nodes: capital and taxi hub masks
|
||||||
switch(race)
|
switch(race)
|
||||||
{
|
{
|
||||||
case RACE_HUMAN: SetTaximaskNode(2); break; // Human
|
case RACE_HUMAN: SetTaximaskNode(2); break; // Human
|
||||||
|
|
@ -144,12 +155,6 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 leve
|
||||||
case RACE_DRAENEI: SetTaximaskNode(94); break; // Draenei
|
case RACE_DRAENEI: SetTaximaskNode(94); break; // Draenei
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(chrClass)
|
|
||||||
{
|
|
||||||
case CLASS_DEATH_KNIGHT: // TODO: figure out initial known nodes
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// new continent starting masks (It will be accessible only at new map)
|
// new continent starting masks (It will be accessible only at new map)
|
||||||
switch(Player::TeamForRace(race))
|
switch(Player::TeamForRace(race))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue