diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/DataStores/DBCStores.cpp | 4 | ||||
| -rw-r--r-- | src/server/game/DataStores/DBCStructure.h | 164 | ||||
| -rw-r--r-- | src/server/game/DataStores/DBCfmt.h | 8 | ||||
| -rw-r--r-- | src/server/game/Entities/GameObject/GameObject.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Entities/Pet/Pet.cpp | 22 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 16 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellMgr.cpp | 10 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_learn.cpp | 4 |
8 files changed, 132 insertions, 108 deletions
diff --git a/src/server/game/DataStores/DBCStores.cpp b/src/server/game/DataStores/DBCStores.cpp index a636c28b4ee..c1eb056ec98 100644 --- a/src/server/game/DataStores/DBCStores.cpp +++ b/src/server/game/DataStores/DBCStores.cpp @@ -596,7 +596,7 @@ void LoadDBCStores(const std::string& dataPath) if (!cFamily) continue; - if (skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1]) + if (skillLine->skillId != cFamily->SkillLine[0] && skillLine->skillId != cFamily->SkillLine[1]) continue; if (skillLine->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) @@ -854,7 +854,7 @@ char const* GetPetName(uint32 petfamily, uint32 /*dbclang*/) CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(petfamily); if (!pet_family) return NULL; - return pet_family->Name ? pet_family->Name : NULL; + return pet_family->Name_lang ? pet_family->Name_lang : NULL; } TalentSpellPos const* GetTalentSpellPos(uint32 spellId) diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 6e3b468d917..f00cbc55d3a 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -822,55 +822,67 @@ struct CreatureDisplayInfoExtraEntry struct CreatureFamilyEntry { - uint32 ID; // 0 m_ID - float minScale; // 1 m_minScale - uint32 minScaleLevel; // 2 m_minScaleLevel - float maxScale; // 3 m_maxScale - uint32 maxScaleLevel; // 4 m_maxScaleLevel - uint32 skillLine[2]; // 5-6 m_skillLine - uint32 petFoodMask; // 7 m_petFoodMask - int32 petTalentType; // 8 m_petTalentType - // 9 m_categoryEnumID - char* Name; // 10 m_name_lang - // 11 m_iconFile + uint32 ID; // 0 + float MinScale; // 1 + uint32 MinScaleLevel; // 2 + float MaxScale; // 3 + uint32 MaxScaleLevel; // 4 + uint32 SkillLine[2]; // 5-6 + uint32 PetFoodMask; // 7 + uint32 PetTalentType; // 8 + //uint32 CategoryEnumID; // 9 + char* Name_lang; // 10 + //char* IconFile; // 11 }; struct CreatureModelDataEntry { - uint32 Id; - uint32 Flags; - //char* ModelPath - //uint32 Unk1; - //float Scale; // Used in calculation of unit collision data - //int32 Unk2 - //int32 Unk3 - //uint32 Unk4 - //uint32 Unk5 - //float Unk6 - //uint32 Unk7 - //float Unk8 - //uint32 Unk9 - //uint32 Unk10 - //float CollisionWidth; - float CollisionHeight; - float MountHeight; // Used in calculation of unit collision data when mounted - //float Unks[11] + uint32 ID; // 0 + uint32 Flags; // 1 + //uint32 FileDataID; // 2 + //uint32 SizeClass; // 3 + //float ModelScale; // 4 + //uint32 BloodID; // 5 + //uint32 FootprintTextureID; // 6 + //float FootprintTextureLength; // 7 + //float FootprintTextureWidth; // 8 + //float FootprintParticleScale; // 9 + //uint32 FoleyMaterialID; // 10 + //uint32 FootstepShakeSize; // 11 + //uint32 DeathThudShakeSize; // 12 + //uint32 SoundID; // 13 + //float CollisionWidth; // 14 + float CollisionHeight; // 15 + float MountHeight; // 16 + //float GeoBoxMin[3]; // 17-19 + //float GeoBoxMax[3]; // 20-22 + //float WorldEffectScale; // 23 + //float AttachedEffectScale; // 24 + //float MissileCollisionRadius; // 25 + //float MissileCollisionPush; // 26 + //float MissileCollisionRaise; // 27 + //float OverrideLootEffectScale; // 28 + //float OverrideNameScale; // 29 + //float OverrideSelectionRadius; // 30 + //float TamedPetBaseScale; // 31 + //uint32 CreatureGeosetDataID; // 32 + //float HoverHeight; // 33 }; #define MAX_CREATURE_SPELL_DATA_SLOT 4 struct CreatureSpellDataEntry { - uint32 ID; // 0 m_ID - uint32 spellId[MAX_CREATURE_SPELL_DATA_SLOT]; // 1-4 m_spells[4] - //uint32 availability[MAX_CREATURE_SPELL_DATA_SLOT]; // 4-7 m_availability[4] + uint32 ID; // 0 + uint32 Spells[MAX_CREATURE_SPELL_DATA_SLOT]; // 1-4 + //uint32 Availability[MAX_CREATURE_SPELL_DATA_SLOT]; // 4-7 }; struct CreatureTypeEntry { - uint32 ID; // 0 m_ID - //char* Name; // 1 m_name_lang - //uint32 no_expirience; // 2 m_flags no exp? critters, non-combat pets, gas cloud. + uint32 ID; // 0 + //char* Name_lang; // 1 + //uint32 Flags; // 2 no exp? critters, non-combat pets, gas cloud. }; /* not used @@ -885,45 +897,57 @@ struct CurrencyCategoryEntry struct CurrencyTypesEntry { - uint32 ID; // 0 not used - uint32 Category; // 1 may be category - //char* name; // 2 - //char* iconName; // 3 - //uint32 unk4; // 4 all 0 - uint32 HasSubstitution; // 5 archaeology-related (?) - uint32 SubstitutionId; // 6 - uint32 TotalCap; // 7 - uint32 WeekCap; // 8 - uint32 Flags; // 9 - //char* description; // 10 + uint32 ID; // 0 + uint32 CategoryID; // 1 + //char* Name_lang; // 2 + //char* InventoryIcon[2]; // 3-4 + //uint32 SpellWeight; // 5 archaeology-related (?) + //uint32 SpellCategory; // 6 + uint32 MaxQty; // 7 + uint32 MaxEarnablePerWeek; // 8 + uint32 Flags; // 9 + //uint32 Quality; // 10 + //char* Description_lang; // 11 }; struct DestructibleModelDataEntry { - uint32 Id; - uint32 DamagedDisplayId; - //uint32 DamagedUnk1; - //uint32 DamagedUnk2; - //uint32 DamagedUnk3; - uint32 DestroyedDisplayId; - //uint32 DestroyedUnk1; - //uint32 DestroyedUnk2; - //uint32 DestroyedUnk3; - //uint32 DestroyedUnk4; - uint32 RebuildingDisplayId; - //uint32 RebuildingUnk1; - //uint32 RebuildingUnk2; - //uint32 RebuildingUnk3; - //uint32 RebuildingUnk4; - uint32 SmokeDisplayId; - //uint32 SmokeUnk1; - //uint32 SmokeUnk2; - //uint32 SmokeUnk3; - //uint32 SmokeUnk4; - //uint32 UnkDisplayid; - //uint32 Unk6; - //uint32 Unk7; - //uint32 Unk8; + uint32 ID; // 0 + struct + { + uint32 DisplayID; // 1 + //uint32 ImpactEffectDoodadSet; // 2 + //uint32 AmbientDoodadSet; // 3 + //uint32 NameSet; // 4 + } StateDamaged; + struct + { + uint32 DisplayID; // 5 + //uint32 DestructionDoodadSet; // 6 + //uint32 ImpactEffectDoodadSet; // 7 + //uint32 AmbientDoodadSet; // 8 + //uint32 NameSet; // 9 + } StateDestroyed; + struct + { + uint32 DisplayID; // 10 + //uint32 DestructionDoodadSet; // 11 + //uint32 ImpactEffectDoodadSet; // 12 + //uint32 AmbientDoodadSet; // 13 + //uint32 NameSet; // 14 + } StateRebuilding; + struct + { + //uint32 DisplayID; // 15 + //uint32 InitDoodadSet; // 16 + //uint32 AmbientDoodadSet; // 17 + //uint32 NameSet; // 18 + } StateSmoke; + //uint32 EjectDirection; // 19 + //uint32 RepairGroundFx; // 20 + //uint32 DoNotHighlight; // 21 + //uint32 HealEffect; // 22 + //uint32 HealEffectSpeed; // 23 }; struct DungeonEncounterEntry diff --git a/src/server/game/DataStores/DBCfmt.h b/src/server/game/DataStores/DBCfmt.h index 70ef56e8401..c6c6f9667f3 100644 --- a/src/server/game/DataStores/DBCfmt.h +++ b/src/server/game/DataStores/DBCfmt.h @@ -44,12 +44,12 @@ char const ChrClassesXPowerTypesfmt[] = "nii"; char const CinematicSequencesEntryfmt[] = "nxxxxxxxxx"; char const CreatureDisplayInfofmt[] = "nixifxxxxxxxxxxxxxxxx"; char const CreatureDisplayInfoExtrafmt[] = "dixxxxxxxxxxxxxxxxxxx"; -char const CreatureModelDatafmt[] = "nixxxxxxxxxxxxffxxxxxxxxxxxxxxx"; -char const CreatureFamilyfmt[] = "nfifiiiiixsx"; +char const CreatureFamilyfmt[] = "nfifiiiiixix"; +char const CreatureModelDatafmt[] = "nixxxxxxxxxxxxxffxxxxxxxxxxxxxxxxx"; char const CreatureSpellDatafmt[] = "niiiixxxx"; char const CreatureTypefmt[] = "nxx"; -char const CurrencyTypesfmt[] = "nixxxiiiiix"; -char const DestructibleModelDatafmt[] = "ixxixxxixxxixxxixxxxxxxx"; +char const CurrencyTypesfmt[] = "nixxxxxixixx"; +char const DestructibleModelDatafmt[] = "nixxxixxxxixxxxxxxxxxxxx"; char const DungeonEncounterfmt[] = "niixisxx"; char const DurabilityCostsfmt[] = "niiiiiiiiiiiiiiiiiiiiiiiiiiiii"; char const DurabilityQualityfmt[] = "nf"; diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 716ee946778..c010e3f1506 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -2017,8 +2017,8 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* uint32 modelId = m_goInfo->displayId; if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->destructibleBuilding.DestructibleModelRec)) - if (modelData->DamagedDisplayId) - modelId = modelData->DamagedDisplayId; + if (modelData->StateDamaged.DisplayID) + modelId = modelData->StateDamaged.DisplayID; SetDisplayId(modelId); if (setHealth) @@ -2045,8 +2045,8 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* uint32 modelId = m_goInfo->displayId; if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->destructibleBuilding.DestructibleModelRec)) - if (modelData->DestroyedDisplayId) - modelId = modelData->DestroyedDisplayId; + if (modelData->StateDestroyed.DisplayID) + modelId = modelData->StateDestroyed.DisplayID; SetDisplayId(modelId); if (setHealth) @@ -2064,8 +2064,8 @@ void GameObject::SetDestructibleState(GameObjectDestructibleState state, Player* uint32 modelId = m_goInfo->displayId; if (DestructibleModelDataEntry const* modelData = sDestructibleModelDataStore.LookupEntry(m_goInfo->destructibleBuilding.DestructibleModelRec)) - if (modelData->RebuildingDisplayId) - modelId = modelData->RebuildingDisplayId; + if (modelData->StateRebuilding.DisplayID) + modelId = modelData->StateRebuilding.DisplayID; SetDisplayId(modelId); // restores to full health diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index e9799a3c648..9d8d0d1f6e9 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -747,7 +747,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) SetDisplayId(creature->GetDisplayId()); if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family)) - SetName(cFamily->Name); + SetName(cFamily->Name_lang); else SetName(creature->GetNameForLocaleIdx(sObjectMgr->GetDBCLocaleIndex())); @@ -760,7 +760,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureTemplate const* cinfo, Unit* owner) return false; if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family)) - SetName(cFamily->Name); + SetName(cFamily->Name_lang); Relocate(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ(), owner->GetOrientation()); @@ -834,15 +834,15 @@ bool Guardian::InitStatsForLevel(uint8 petlevel) //scale CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family); - if (cFamily && cFamily->minScale > 0.0f && petType == HUNTER_PET) + if (cFamily && cFamily->MinScale > 0.0f && petType == HUNTER_PET) { float scale; - if (getLevel() >= cFamily->maxScaleLevel) - scale = cFamily->maxScale; - else if (getLevel() <= cFamily->minScaleLevel) - scale = cFamily->minScale; + if (getLevel() >= cFamily->MaxScaleLevel) + scale = cFamily->MaxScale; + else if (getLevel() <= cFamily->MinScaleLevel) + scale = cFamily->MinScale; else - scale = cFamily->minScale + float(getLevel() - cFamily->minScaleLevel) / cFamily->maxScaleLevel * (cFamily->maxScale - cFamily->minScale); + scale = cFamily->MinScale + float(getLevel() - cFamily->MinScaleLevel) / cFamily->MaxScaleLevel * (cFamily->MaxScale - cFamily->MinScale); SetObjectScale(scale); } @@ -1045,7 +1045,7 @@ bool Pet::HaveInDiet(ItemTemplate const* item) const if (!cFamily) return false; - uint32 diet = cFamily->petFoodMask; + uint32 diet = cFamily->PetFoodMask; uint32 FoodMask = 1 << (item->FoodType-1); return (diet & FoodMask) != 0; } @@ -1633,7 +1633,7 @@ bool Pet::resetTalents() return false; // Check pet talent type CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family); - if (!pet_family || pet_family->petTalentType < 0) + if (!pet_family || pet_family->PetTalentType < 0) return false; uint8 level = getLevel(); @@ -1658,7 +1658,7 @@ bool Pet::resetTalents() continue; // unlearn only talents for pets family talent type - if (!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask)) + if (!((1 << pet_family->PetTalentType) & talentTabInfo->petTalentMask)) continue; for (uint8 j = 0; j < MAX_TALENT_RANK; ++j) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index d97bc4da22d..f3d91be14cb 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -7114,7 +7114,7 @@ void Player::SendCurrencies() const CurrencyTypesEntry const* entry = sCurrencyTypesStore.LookupEntry(itr->first); // not send init meta currencies. - if (!entry || entry->Category == CURRENCY_CATEGORY_META_CONQUEST) + if (!entry || entry->CategoryID == CURRENCY_CATEGORY_META_CONQUEST) continue; uint32 precision = (entry->Flags & CURRENCY_FLAG_HIGH_PRECISION) ? CURRENCY_PRECISION : 1; @@ -7263,7 +7263,7 @@ void Player::ModifyCurrency(uint32 id, int32 count, bool printLog/* = true*/, bo if (count > 0) UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CURRENCY, id, count); - if (currency->Category == CURRENCY_CATEGORY_META_CONQUEST) + if (currency->CategoryID == CURRENCY_CATEGORY_META_CONQUEST) { // count was changed to week limit, now we can modify original points. ModifyCurrency(CURRENCY_TYPE_CONQUEST_POINTS, count, printLog); @@ -7349,12 +7349,12 @@ uint32 Player::GetCurrencyWeekCap(CurrencyTypesEntry const* currency) const return Trinity::Currency::BgConquestRatingCalculator(GetRBGPersonalRating()) * CURRENCY_PRECISION; } - return currency->WeekCap; + return currency->MaxEarnablePerWeek; } uint32 Player::GetCurrencyTotalCap(CurrencyTypesEntry const* currency) const { - uint32 cap = currency->TotalCap; + uint32 cap = currency->MaxQty; switch (currency->ID) { @@ -25814,11 +25814,11 @@ void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRa if (!pet_family) return; - if (pet_family->petTalentType < 0) // not hunter pet + if (pet_family->PetTalentType < 0) // not hunter pet return; // prevent learn talent for different family (cheating) - if (!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask)) + if (!((1 << pet_family->PetTalentType) & talentTabInfo->petTalentMask)) return; // find current max talent rank (0~5) @@ -26076,7 +26076,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket* data) return; CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family); - if (!pet_family || pet_family->petTalentType < 0) + if (!pet_family || pet_family->PetTalentType < 0) return; for (uint32 talentTabId = 1; talentTabId < sTalentTabStore.GetNumRows(); ++talentTabId) @@ -26085,7 +26085,7 @@ void Player::BuildPetTalentsInfoData(WorldPacket* data) if (!talentTabInfo) continue; - if (!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask)) + if (!((1 << pet_family->PetTalentType) & talentTabInfo->petTalentMask)) continue; for (uint32 talentId = 0; talentId < sTalentStore.GetNumRows(); ++talentId) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 46fac6340a8..7aebc202d81 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2432,7 +2432,7 @@ void SpellMgr::LoadPetLevelupSpellMap() for (uint8 j = 0; j < 2; ++j) { - if (!creatureFamily->skillLine[j]) + if (!creatureFamily->SkillLine[j]) continue; for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k) @@ -2441,11 +2441,11 @@ void SpellMgr::LoadPetLevelupSpellMap() if (!skillLine) continue; - //if (skillLine->skillId != creatureFamily->skillLine[0] && - // (!creatureFamily->skillLine[1] || skillLine->skillId != creatureFamily->skillLine[1])) + //if (skillLine->skillId != creatureFamily->SkillLine[0] && + // (!creatureFamily->SkillLine[1] || skillLine->skillId != creatureFamily->SkillLine[1])) // continue; - if (skillLine->skillId != creatureFamily->skillLine[j]) + if (skillLine->skillId != creatureFamily->SkillLine[j]) continue; if (skillLine->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN) @@ -2543,7 +2543,7 @@ void SpellMgr::LoadPetDefaultSpells() int32 petSpellsId = -int32(itr->second.PetSpellDataId); PetDefaultSpellsEntry petDefSpells; for (uint8 j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j) - petDefSpells.spellid[j] = spellDataEntry->spellId[j]; + petDefSpells.spellid[j] = spellDataEntry->Spells[j]; if (LoadPetDefaultSpells_helper(&itr->second, petDefSpells)) { diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index 886e866d66a..bed6715fec1 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -266,7 +266,7 @@ public: return false; } - if (petFamily->petTalentType < 0) // not hunter pet + if (petFamily->PetTalentType < 0) // not hunter pet { handler->SendSysMessage(LANG_WRONG_PET_TYPE); handler->SetSentErrorMessage(true); @@ -284,7 +284,7 @@ public: continue; // prevent learn talent for different family (cheating) - if (((1 << petFamily->petTalentType) & talentTabInfo->petTalentMask) == 0) + if (((1 << petFamily->PetTalentType) & talentTabInfo->petTalentMask) == 0) continue; // search highest talent rank |
