Core/DataStores: Updated GameObjectDisplayInfo.dbc, GemProperties.dbc, GlyphProperties.dbc, GlyphSlot.dbc, GuildPerkSpells.dbc structs

This commit is contained in:
Intel
2014-11-08 20:21:17 +02:00
parent 4e684f74a8
commit a7f56c2208
17 changed files with 93 additions and 94 deletions
@@ -96,7 +96,7 @@ GameObjectModel::~GameObjectModel()
bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayInfoEntry& info)
{
ModelList::const_iterator it = model_list.find(info.Displayid);
ModelList::const_iterator it = model_list.find(info.ID);
if (it == model_list.end())
return false;
+1 -1
View File
@@ -1033,7 +1033,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text)
if (!glyphPropEntry)
return 0;
return glyphPropEntry->SpellId;
return glyphPropEntry->SpellID;
}
}
+2 -2
View File
@@ -522,10 +522,10 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
return false;
}
// Validate glyph's spell
_spell = sSpellMgr->GetSpellInfo(_glyph->SpellId);
_spell = sSpellMgr->GetSpellInfo(_glyph->SpellID);
if (!_spell)
{
TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId);
TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellID);
return false;
}
return true;
+6 -6
View File
@@ -411,12 +411,12 @@ void LoadDBCStores(const std::string& dataPath)
{
if (GameObjectDisplayInfoEntry const* info = sGameObjectDisplayInfoStore.LookupEntry(i))
{
if (info->maxX < info->minX)
std::swap(*(float*)(&info->maxX), *(float*)(&info->minX));
if (info->maxY < info->minY)
std::swap(*(float*)(&info->maxY), *(float*)(&info->minY));
if (info->maxZ < info->minZ)
std::swap(*(float*)(&info->maxZ), *(float*)(&info->minZ));
if (info->GeoBoxMax.X < info->GeoBoxMin.X)
std::swap(*(float*)(&info->GeoBoxMax.X), *(float*)(&info->GeoBoxMin.X));
if (info->GeoBoxMax.Y < info->GeoBoxMin.Y)
std::swap(*(float*)(&info->GeoBoxMax.Y), *(float*)(&info->GeoBoxMin.Y));
if (info->GeoBoxMax.Z < info->GeoBoxMin.Z)
std::swap(*(float*)(&info->GeoBoxMax.Z), *(float*)(&info->GeoBoxMin.Z));
}
}
+48 -49
View File
@@ -1079,41 +1079,40 @@ struct FactionTemplateEntry
struct GameObjectDisplayInfoEntry
{
uint32 Displayid; // 0 m_ID
char* filename; // 1
//uint32 unk1[10]; //2-11
float minX;
float minY;
float minZ;
float maxX;
float maxY;
float maxZ;
//uint32 transport; //18
uint32 ID; // 0
uint32 FileDataID; // 1
//uint32 Sound[10]; // 2-11
DBCPosition3D GeoBoxMin; // 12-14
DBCPosition3D GeoBoxMax; // 15-17
//uint32 ObjectEffectPackageID; // 18
//float OverrideLootEffectScale; // 19
//float OverrideNameScale; // 20
};
struct GemPropertiesEntry
{
uint32 ID; // 0 m_id
uint32 spellitemenchantement; // 1 m_enchant_id
// 2 m_maxcount_inv
// 3 m_maxcount_item
uint32 color; // 4 m_type
uint32 minJewelCraftingSkill; // 5 m_minJewelCraftingSkill
uint32 ID; // 0
uint32 EnchantID; // 1
//uint32 MaxCountInv; // 2
//uint32 MaxCountItem; // 3
uint32 Type; // 4
uint32 MinItemLevel; // 5
};
struct GlyphPropertiesEntry
{
uint32 Id;
uint32 SpellId;
uint32 TypeFlags;
uint32 IconId; // GlyphIconId (SpellIcon.dbc)
uint32 ID; // 0
uint32 SpellID; // 1
uint32 Type; // 2
uint32 SpellIconID; // 3 GlyphIconId (SpellIcon.dbc)
//uint32 GlyphExclusiveCategoryID; // 4
};
struct GlyphSlotEntry
{
uint32 Id;
uint32 TypeFlags;
uint32 Order;
uint32 ID; // 0
uint32 Type; // 1
//uint32 Tooltip; // 2
};
// All Gt* DBC store data for 100 levels, some by 100 per class/race
@@ -1207,9 +1206,9 @@ struct GtOCTBaseMPByClassEntry
struct GuildPerkSpellsEntry
{
//uint32 Id;
uint32 Level;
uint32 SpellId;
//uint32 ID; // 0
uint32 GuildLevel; // 1
uint32 SpellID; // 2
};
/* no used
@@ -1234,49 +1233,49 @@ struct HolidayNamesEntry
struct HolidaysEntry
{
uint32 Id; // 0 m_ID
uint32 Duration[MAX_HOLIDAY_DURATIONS]; // 1-10 m_duration
uint32 Date[MAX_HOLIDAY_DATES]; // 11-36 m_date (dates in unix time starting at January, 1, 2000)
uint32 Region; // 37 m_region (wow region)
uint32 Looping; // 38 m_looping
uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 39-48 m_calendarFlags
//uint32 holidayNameId; // 49 m_holidayNameID (HolidayNames.dbc)
//uint32 holidayDescriptionId; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc)
char* TextureFilename; // 51 m_textureFilename
uint32 Priority; // 52 m_priority
uint32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday)
//uint32 flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1)
uint32 ID; // 0 m_ID
uint32 Duration[MAX_HOLIDAY_DURATIONS]; // 1-10 m_duration
uint32 Date[MAX_HOLIDAY_DATES]; // 11-36 m_date (dates in unix time starting at January, 1, 2000)
uint32 Region; // 37 m_region (wow region)
uint32 Looping; // 38 m_looping
uint32 CalendarFlags[MAX_HOLIDAY_FLAGS]; // 39-48 m_calendarFlags
//uint32 HolidayNameID; // 49 m_holidayNameID (HolidayNames.dbc)
//uint32 HolidayDescriptionID; // 50 m_holidayDescriptionID (HolidayDescriptions.dbc)
char* TextureFilename; // 51 m_textureFilename
uint32 Priority; // 52 m_priority
uint32 CalendarFilterType; // 53 m_calendarFilterType (-1 = Fishing Contest, 0 = Unk, 1 = Darkmoon Festival, 2 = Yearly holiday)
//uint32 Flags; // 54 m_flags (0 = Darkmoon Faire, Fishing Contest and Wotlk Launch, rest is 1)
};
// ImportPriceArmor.dbc
struct ImportPriceArmorEntry
{
uint32 InventoryType; // 1 Id/InventoryType
float ClothFactor; // 2 Price factor cloth
float LeatherFactor; // 3 Price factor leather
float MailFactor; // 4 Price factor mail
float PlateFactor; // 5 Price factor plate
uint32 ID; // 1 Id/InventoryType
float ClothFactor; // 2 Price factor cloth
float LeatherFactor; // 3 Price factor leather
float MailFactor; // 4 Price factor mail
float PlateFactor; // 5 Price factor plate
};
// ImportPriceQuality.dbc
struct ImportPriceQualityEntry
{
uint32 QualityId; // 1 Quality Id (+1?)
float Factor; // 2 Price factor
uint32 ID; // 1 Quality Id (+1?)
float Factor; // 2 Price factor
};
// ImportPriceShield.dbc
struct ImportPriceShieldEntry
{
uint32 Id; // 1 Unk id (only 1 and 2)
float Factor; // 2 Price factor
uint32 ID; // 1 Unk id (only 1 and 2)
float Factor; // 2 Price factor
};
// ImportPriceWeapon.dbc
struct ImportPriceWeaponEntry
{
uint32 Id; // 1 Unk id (mainhand - 0, offhand - 1, weapon - 2, 2hweapon - 3, ranged/rangedright/relic - 4)
float Factor; // 2 Price factor
uint32 ID; // 1 Unk id (mainhand - 0, offhand - 1, weapon - 2, 2hweapon - 3, ranged/rangedright/relic - 4)
float Factor; // 2 Price factor
};
// ItemPriceBase.dbc
+3 -3
View File
@@ -57,10 +57,10 @@ char const EmotesEntryfmt[] = "nxxiiixx";
char const EmotesTextEntryfmt[] = "nxixxxxxxxxxxxxxxxx";
char const FactionEntryfmt[] = "niiiiiiiiiiiiiiiiiiffixsxi";
char const FactionTemplateEntryfmt[] = "niiiiiiiiiiiii";
char const GameObjectDisplayInfofmt[] = "nsxxxxxxxxxxffffffxxx";
char const GameObjectDisplayInfofmt[] = "nixxxxxxxxxxffffffxxx";
char const GemPropertiesEntryfmt[] = "nixxii";
char const GlyphPropertiesfmt[] = "niii";
char const GlyphSlotfmt[] = "nii";
char const GlyphPropertiesfmt[] = "niiix";
char const GlyphSlotfmt[] = "nix";
char const GtBarberShopCostBasefmt[] = "xf";
char const GtCombatRatingsfmt[] = "xf";
char const GtOCTHpPerStaminafmt[] = "df";
@@ -1875,9 +1875,9 @@ bool GameObject::IsInRange(float x, float y, float z, float radius) const
float cosB = dy / dist;
dx = dist * (cosA * cosB + sinA * sinB);
dy = dist * (cosA * sinB - sinA * cosB);
return dx < info->maxX + radius && dx > info->minX - radius
&& dy < info->maxY + radius && dy > info->minY - radius
&& dz < info->maxZ + radius && dz > info->minZ - radius;
return dx < info->GeoBoxMax.X + radius && dx > info->GeoBoxMin.X - radius
&& dy < info->GeoBoxMax.Y + radius && dy > info->GeoBoxMin.Y - radius
&& dz < info->GeoBoxMax.Z + radius && dz > info->GeoBoxMin.Z - radius;
}
void GameObject::EventInform(uint32 eventId, WorldObject* invoker /*= NULL*/)
+1 -1
View File
@@ -948,7 +948,7 @@ bool Item::GemsFitSockets() const
{
GemPropertiesEntry const* gemProperty = sGemPropertiesStore.LookupEntry(gemProto->GemProperties);
if (gemProperty)
GemColor = gemProperty->color;
GemColor = gemProperty->Type;
}
}
+7 -7
View File
@@ -17910,13 +17910,13 @@ void Player::_LoadGlyphAuras()
{
if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(GetGlyphSlot(i)))
{
if (gp->TypeFlags == gs->TypeFlags)
if (gp->Type == gs->Type)
{
CastSpell(this, gp->SpellId, true);
CastSpell(this, gp->SpellID, true);
continue;
}
else
TC_LOG_ERROR("entities.player", "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->TypeFlags, gs->TypeFlags);
TC_LOG_ERROR("entities.player", "Player %s has glyph with typeflags %u in slot with typeflags %u, removing.", m_name.c_str(), gp->Type, gs->Type);
}
else
TC_LOG_ERROR("entities.player", "Player %s has not existing glyph slot entry %u on index %u", m_name.c_str(), GetGlyphSlot(i), i);
@@ -22494,7 +22494,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
if (!gemProperty)
continue;
uint8 GemColor = gemProperty->color;
uint8 GemColor = gemProperty->Type;
for (uint8 b = 0, tmpcolormask = 1; b < 4; b++, tmpcolormask <<= 1)
{
@@ -24915,7 +24915,7 @@ void Player::InitGlyphsForLevel()
uint32 slot = 0;
for (uint32 i = 0; i < sGlyphSlotStore.GetNumRows() && slot < MAX_GLYPH_SLOT_INDEX; ++i)
if (GlyphSlotEntry const* gs = sGlyphSlotStore.LookupEntry(i))
SetGlyphSlot(slot++, gs->Id);
SetGlyphSlot(slot++, gs->ID);
uint8 level = getLevel();
uint32 slotMask = 0;
@@ -26646,7 +26646,7 @@ void Player::ActivateSpec(uint8 spec)
// remove secondary glyph
if (uint32 oldglyph = GetGlyph(GetActiveSpec(), slot))
if (GlyphPropertiesEntry const* old_gp = sGlyphPropertiesStore.LookupEntry(oldglyph))
RemoveAurasDueToSpell(old_gp->SpellId);
RemoveAurasDueToSpell(old_gp->SpellID);
SetActiveSpec(spec);
uint32 spentTalents = 0;
@@ -26701,7 +26701,7 @@ void Player::ActivateSpec(uint8 spec)
// apply primary glyph
if (glyph)
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph))
CastSpell(this, gp->SpellId, true);
CastSpell(this, gp->SpellID, true);
SetGlyph(slot, glyph);
}
+6 -6
View File
@@ -2374,8 +2374,8 @@ void Guild::SendLoginInfo(WorldSession* session)
for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i)
if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i))
if (entry->Level <= GetLevel())
player->LearnSpell(entry->SpellId, true);
if (entry->GuildLevel <= GetLevel())
player->LearnSpell(entry->SpellID, true);
SendGuildReputationWeeklyCap(session, member->GetWeekReputation());
@@ -2830,8 +2830,8 @@ void Guild::DeleteMember(ObjectGuid guid, bool isDisbanding, bool isKicked, bool
for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i)
if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i))
if (entry->Level <= GetLevel())
player->RemoveSpell(entry->SpellId, false, false);
if (entry->GuildLevel <= GetLevel())
player->RemoveSpell(entry->SpellID, false, false);
}
_DeleteMemberFromDB(guid.GetCounter());
@@ -3586,8 +3586,8 @@ void Guild::GiveXP(uint32 xp, Player* source)
std::vector<uint32> perksToLearn;
for (uint32 i = 0; i < sGuildPerkSpellsStore.GetNumRows(); ++i)
if (GuildPerkSpellsEntry const* entry = sGuildPerkSpellsStore.LookupEntry(i))
if (entry->Level > oldLevel && entry->Level <= GetLevel())
perksToLearn.push_back(entry->SpellId);
if (entry->GuildLevel > oldLevel && entry->GuildLevel <= GetLevel())
perksToLearn.push_back(entry->SpellID);
// Notify all online players that guild level changed and learn perks
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
+1 -1
View File
@@ -158,7 +158,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket& /*recvData*/)
{
HolidaysEntry const* holiday = sHolidaysStore.LookupEntry(666);
data << uint32(holiday->Id); // m_ID
data << uint32(holiday->ID); // m_ID
data << uint32(holiday->Region); // m_region, might be looping
data << uint32(holiday->Looping); // m_looping, might be region
data << uint32(holiday->Priority); // m_priority
@@ -1395,7 +1395,7 @@ void WorldSession::HandleRemoveGlyph(WorldPacket& recvData)
{
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyph))
{
_player->RemoveAurasDueToSpell(gp->SpellId);
_player->RemoveAurasDueToSpell(gp->SpellID);
_player->SetGlyph(slot, 0);
_player->SendTalentsInfoData(false);
}
+5 -5
View File
@@ -1123,19 +1123,19 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
}
// tried to put normal gem in meta socket
if (itemProto->Socket[i].Color == SOCKET_COLOR_META && GemProps[i]->color != SOCKET_COLOR_META)
if (itemProto->Socket[i].Color == SOCKET_COLOR_META && GemProps[i]->Type != SOCKET_COLOR_META)
return;
// tried to put meta gem in normal socket
if (itemProto->Socket[i].Color != SOCKET_COLOR_META && GemProps[i]->color == SOCKET_COLOR_META)
if (itemProto->Socket[i].Color != SOCKET_COLOR_META && GemProps[i]->Type == SOCKET_COLOR_META)
return;
// tried to put normal gem in cogwheel socket
if (itemProto->Socket[i].Color == SOCKET_COLOR_COGWHEEL && GemProps[i]->color != SOCKET_COLOR_COGWHEEL)
if (itemProto->Socket[i].Color == SOCKET_COLOR_COGWHEEL && GemProps[i]->Type != SOCKET_COLOR_COGWHEEL)
return;
// tried to put cogwheel gem in normal socket
if (itemProto->Socket[i].Color != SOCKET_COLOR_COGWHEEL && GemProps[i]->color == SOCKET_COLOR_COGWHEEL)
if (itemProto->Socket[i].Color != SOCKET_COLOR_COGWHEEL && GemProps[i]->Type == SOCKET_COLOR_COGWHEEL)
return;
}
@@ -1143,7 +1143,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
uint32 OldEnchants[MAX_GEM_SOCKETS];
for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get new and old enchantments
{
GemEnchants[i] = (GemProps[i]) ? GemProps[i]->spellitemenchantement : 0;
GemEnchants[i] = (GemProps[i]) ? GemProps[i]->EnchantID : 0;
OldEnchants[i] = itemTarget->GetEnchantmentId(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i));
}
+1 -1
View File
@@ -333,7 +333,7 @@ bool ReputationMgr::SetReputation(FactionEntry const* factionEntry, int32 standi
{
if (FactionEntry const* factionEntryCalc = sFactionStore.LookupEntry(*itr))
{
if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > ReputationRank(factionEntryCalc->ParentFactionCapOut))
if (factionEntryCalc == factionEntry || GetRank(factionEntryCalc) > ReputationRank(factionEntryCalc->ParentFactionCapIn))
continue;
int32 spilloverRep = int32(spillOverRepOut * factionEntryCalc->ParentFactionModIn);
if (spilloverRep != 0 || !incremental)
@@ -1250,12 +1250,12 @@ void AuraEffect::HandleShapeshiftBoosts(Unit* target, bool apply) const
{
if (GlyphPropertiesEntry const* glyph = sGlyphPropertiesStore.LookupEntry(glyphId))
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellId);
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(glyph->SpellID);
if (!spellInfo || !(spellInfo->Attributes & (SPELL_ATTR0_PASSIVE | SPELL_ATTR0_HIDDEN_CLIENTSIDE)))
continue;
if (spellInfo->Stances & (1 << (GetMiscValue() - 1)))
target->CastSpell(target, glyph->SpellId, true, NULL, this);
target->CastSpell(target, glyph->SpellID, true, NULL, this);
}
}
}
+1 -1
View File
@@ -5095,7 +5095,7 @@ SpellCastResult Spell::CheckCast(bool strict)
{
uint32 glyphId = m_spellInfo->Effects[i].MiscValue;
if (GlyphPropertiesEntry const* gp = sGlyphPropertiesStore.LookupEntry(glyphId))
if (m_caster->HasAura(gp->SpellId))
if (m_caster->HasAura(gp->SpellID))
return SPELL_FAILED_UNIQUE_GLYPH;
break;
}
+4 -4
View File
@@ -4026,7 +4026,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex)
{
if (GlyphSlotEntry const* newGlyphSlot = sGlyphSlotStore.LookupEntry(player->GetGlyphSlot(m_glyphIndex)))
{
if (newGlyphProperties->TypeFlags != newGlyphSlot->TypeFlags)
if (newGlyphProperties->Type != newGlyphSlot->Type)
{
SendCastResult(SPELL_FAILED_INVALID_GLYPH);
return; // glyph slot mismatch
@@ -4038,12 +4038,12 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex)
{
if (GlyphPropertiesEntry const* oldGlyphProperties = sGlyphPropertiesStore.LookupEntry(oldGlyph))
{
player->RemoveAurasDueToSpell(oldGlyphProperties->SpellId);
player->RemoveAurasDueToSpell(oldGlyphProperties->SpellID);
player->SetGlyph(m_glyphIndex, 0);
}
}
player->CastSpell(m_caster, newGlyphProperties->SpellId, true);
player->CastSpell(m_caster, newGlyphProperties->SpellID, true);
player->SetGlyph(m_glyphIndex, newGlyph);
player->SendTalentsInfoData(false);
}
@@ -4052,7 +4052,7 @@ void Spell::EffectApplyGlyph(SpellEffIndex effIndex)
{
if (GlyphPropertiesEntry const* oldGlyphProperties = sGlyphPropertiesStore.LookupEntry(oldGlyph))
{
player->RemoveAurasDueToSpell(oldGlyphProperties->SpellId);
player->RemoveAurasDueToSpell(oldGlyphProperties->SpellID);
player->SetGlyph(m_glyphIndex, 0);
player->SendTalentsInfoData(false);
}