mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge branch 'master' into 310
Conflicts: src/game/MiscHandler.cpp src/game/Player.cpp src/game/Player.h src/shared/Database/DBCStores.cpp
This commit is contained in:
commit
9debf4dfc0
15 changed files with 182 additions and 48 deletions
|
|
@ -1353,7 +1353,7 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text)
|
|||
return 0;
|
||||
|
||||
int32 rank = param1_str ? (uint32)atol(param1_str) : 0;
|
||||
if(rank >= 5)
|
||||
if(rank >= MAX_TALENT_RANK)
|
||||
return 0;
|
||||
|
||||
if(rank < 0)
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ struct ItemPrototype
|
|||
uint32 MaxDurability;
|
||||
uint32 Area; // id from AreaTable.dbc
|
||||
uint32 Map; // id from Map.dbc
|
||||
uint32 BagFamily; // id from ItemBagFamily.dbc
|
||||
uint32 BagFamily; // bit string (1 << id from ItemBagFamily.dbc)
|
||||
uint32 TotemCategory; // id from TotemCategory.dbc
|
||||
_Socket Socket[MAX_ITEM_PROTO_SOCKETS];
|
||||
uint32 socketBonus; // id from SpellItemEnchantment.dbc
|
||||
|
|
|
|||
|
|
@ -1766,8 +1766,8 @@ bool ChatHandler::HandleLearnAllMyTalentsCommand(const char* /*args*/)
|
|||
|
||||
// search highest talent rank
|
||||
uint32 spellid = 0;
|
||||
int rank = 4;
|
||||
for(; rank >= 0; --rank)
|
||||
|
||||
for(int rank = MAX_TALENT_RANK-1; rank >= 0; --rank)
|
||||
{
|
||||
if(talentInfo->RankID[rank]!=0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1716,6 +1716,35 @@ void ObjectMgr::LoadItemPrototypes()
|
|||
if(proto->Map && !sMapStore.LookupEntry(proto->Map))
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong Map (%u)",i,proto->Map);
|
||||
|
||||
if(proto->BagFamily)
|
||||
{
|
||||
// check bits
|
||||
for(uint32 i = 0; i < sizeof(proto->BagFamily)*8; ++i)
|
||||
{
|
||||
uint32 mask = 1 << i;
|
||||
if((proto->BagFamily & mask)==0)
|
||||
continue;
|
||||
|
||||
ItemBagFamilyEntry const* bf = sItemBagFamilyStore.LookupEntry(i+1);
|
||||
if(!bf)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has bag family bit set not listed in ItemBagFamily.dbc, remove bit",i);
|
||||
const_cast<ItemPrototype*>(proto)->BagFamily &= ~mask;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(BAG_FAMILY_MASK_CURRENCY_TOKENS & mask)
|
||||
{
|
||||
CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(proto->ItemId);
|
||||
if(!ctEntry)
|
||||
{
|
||||
sLog.outErrorDb("Item (Entry: %u) has currency bag family bit set in BagFamily but not listed in CurrencyTypes.dbc, remove bit",i);
|
||||
const_cast<ItemPrototype*>(proto)->BagFamily &= ~mask;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(proto->TotemCategory && !sTotemCategoryStore.LookupEntry(proto->TotemCategory))
|
||||
sLog.outErrorDb("Item (Entry: %u) has wrong TotemCategory (%u)",i,proto->TotemCategory);
|
||||
|
||||
|
|
|
|||
|
|
@ -1277,7 +1277,7 @@ bool Pet::addSpell(uint32 spell_id, uint16 active, PetSpellState state, PetSpell
|
|||
{
|
||||
if(TalentEntry const *talentInfo = sTalentStore.LookupEntry( talentPos->talent_id ))
|
||||
{
|
||||
for(int i=0; i <5; ++i)
|
||||
for(int i=0; i < MAX_TALENT_RANK; ++i)
|
||||
{
|
||||
// skip learning spell and no rank spell case
|
||||
uint32 rankSpellId = talentInfo->RankID[i];
|
||||
|
|
@ -1554,7 +1554,7 @@ bool Pet::resetTalents(bool no_cost)
|
|||
if(!((1 << pet_family->petTalentType) & talentTabInfo->petTalentMask))
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < 5; j++)
|
||||
for (int j = 0; j < MAX_TALENT_RANK; j++)
|
||||
{
|
||||
for(PetSpellMap::iterator itr = m_spells.begin(); itr != m_spells.end();)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2742,7 +2742,7 @@ bool Player::addSpell(uint32 spell_id, bool active, bool learning, bool dependen
|
|||
{
|
||||
if(TalentEntry const *talentInfo = sTalentStore.LookupEntry( talentPos->talent_id ))
|
||||
{
|
||||
for(int i=0; i <5; ++i)
|
||||
for(int i=0; i < MAX_TALENT_RANK; ++i)
|
||||
{
|
||||
// skip learning spell and no rank spell case
|
||||
uint32 rankSpellId = talentInfo->RankID[i];
|
||||
|
|
@ -3355,7 +3355,7 @@ bool Player::resetTalents(bool no_cost)
|
|||
if( (getClassMask() & talentTabInfo->ClassMask) == 0 )
|
||||
continue;
|
||||
|
||||
for (int j = 0; j < 5; j++)
|
||||
for (int j = 0; j < MAX_TALENT_RANK; j++)
|
||||
{
|
||||
for(PlayerSpellMap::iterator itr = GetSpellMap().begin(); itr != GetSpellMap().end();)
|
||||
{
|
||||
|
|
@ -6012,9 +6012,11 @@ bool Player::SetOneFactionReputation(FactionEntry const* factionEntry, int32 sta
|
|||
//Calculate total reputation percent player gain with quest/creature level
|
||||
int32 Player::CalculateReputationGain(uint32 creatureOrQuestLevel, int32 rep, bool for_quest)
|
||||
{
|
||||
int32 percent = 100;
|
||||
|
||||
int32 repMod = GetTotalAuraModifier(SPELL_AURA_MOD_REPUTATION_GAIN);
|
||||
|
||||
int32 percent = rep > 0 ? repMod : -repMod;
|
||||
percent += rep > 0 ? repMod : -repMod;
|
||||
|
||||
if(percent <=0)
|
||||
return 0;
|
||||
|
|
@ -8975,7 +8977,7 @@ uint8 Player::_CanStoreItem_InSpecificSlot( uint8 bag, uint8 slot, ItemPosCountV
|
|||
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
|
||||
|
||||
// currencytoken case (disabled until proper implement)
|
||||
if(slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END && !(false /*pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS*/))
|
||||
if(slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END && !(pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS))
|
||||
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
|
||||
|
||||
// prevent cheating
|
||||
|
|
@ -9309,9 +9311,25 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
|
|||
*no_space_count = count + no_similar_count;
|
||||
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
|
||||
}
|
||||
}
|
||||
|
||||
/* until proper implementation
|
||||
res = _CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START,CURRENCYTOKEN_SLOT_END,dest,pProto,count,false,pItem,bag,slot);
|
||||
if(res!=EQUIP_ERR_OK)
|
||||
{
|
||||
if(no_space_count)
|
||||
*no_space_count = count + no_similar_count;
|
||||
return res;
|
||||
}
|
||||
|
||||
if(count==0)
|
||||
{
|
||||
if(no_similar_count==0)
|
||||
return EQUIP_ERR_OK;
|
||||
|
||||
if(no_space_count)
|
||||
*no_space_count = count + no_similar_count;
|
||||
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
|
||||
}
|
||||
}
|
||||
else if(pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
|
||||
{
|
||||
res = _CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START,CURRENCYTOKEN_SLOT_END,dest,pProto,count,false,pItem,bag,slot);
|
||||
|
|
@ -9332,7 +9350,6 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
|
|||
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
res = _CanStoreItem_InInventorySlots(INVENTORY_SLOT_ITEM_START,INVENTORY_SLOT_ITEM_END,dest,pProto,count,false,pItem,bag,slot);
|
||||
if(res!=EQUIP_ERR_OK)
|
||||
|
|
@ -9480,9 +9497,7 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
|
|||
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
|
||||
}
|
||||
}
|
||||
|
||||
/* until proper implementation
|
||||
else if(false pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
|
||||
else if(pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS)
|
||||
{
|
||||
res = _CanStoreItem_InInventorySlots(CURRENCYTOKEN_SLOT_START,CURRENCYTOKEN_SLOT_END,dest,pProto,count,false,pItem,bag,slot);
|
||||
if(res!=EQUIP_ERR_OK)
|
||||
|
|
@ -9502,7 +9517,6 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
|
|||
return EQUIP_ERR_CANT_CARRY_MORE_OF_THIS;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
for(int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; i++)
|
||||
{
|
||||
|
|
@ -10401,6 +10415,10 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
|
|||
pItem->SetSlot( slot );
|
||||
pItem->SetContainer( NULL );
|
||||
|
||||
// need update known currency
|
||||
if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END)
|
||||
UpdateKnownCurrencies(pItem->GetEntry(),true);
|
||||
|
||||
if( IsInWorld() && update )
|
||||
{
|
||||
pItem->AddToWorld();
|
||||
|
|
@ -10668,23 +10686,32 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
|
|||
|
||||
// remove item dependent auras and casts (only weapon and armor slots)
|
||||
if(slot < EQUIPMENT_SLOT_END)
|
||||
{
|
||||
RemoveItemDependentAurasAndCasts(pItem);
|
||||
|
||||
// remove held enchantments
|
||||
if ( slot == EQUIPMENT_SLOT_MAINHAND )
|
||||
{
|
||||
if (pItem->GetItemSuffixFactor())
|
||||
// remove held enchantments, update expertise
|
||||
if ( slot == EQUIPMENT_SLOT_MAINHAND )
|
||||
{
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_3);
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_4);
|
||||
}
|
||||
else
|
||||
{
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_0);
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_1);
|
||||
if (pItem->GetItemSuffixFactor())
|
||||
{
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_3);
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_4);
|
||||
}
|
||||
else
|
||||
{
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_0);
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_1);
|
||||
}
|
||||
|
||||
UpdateExpertise(BASE_ATTACK);
|
||||
}
|
||||
else if( slot == EQUIPMENT_SLOT_OFFHAND )
|
||||
UpdateExpertise(OFF_ATTACK);
|
||||
}
|
||||
}
|
||||
// need update known currency
|
||||
else if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END)
|
||||
UpdateKnownCurrencies(pItem->GetEntry(),false);
|
||||
|
||||
m_items[slot] = NULL;
|
||||
SetUInt64Value((uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot*2)), 0);
|
||||
|
|
@ -10703,11 +10730,6 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
|
|||
pItem->SetSlot( NULL_SLOT );
|
||||
if( IsInWorld() && update )
|
||||
pItem->SendUpdateToPlayer( this );
|
||||
|
||||
if( slot == EQUIPMENT_SLOT_MAINHAND )
|
||||
UpdateExpertise(BASE_ATTACK);
|
||||
else if( slot == EQUIPMENT_SLOT_OFFHAND )
|
||||
UpdateExpertise(OFF_ATTACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -10792,9 +10814,18 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
|||
// remove item dependent auras and casts (only weapon and armor slots)
|
||||
RemoveItemDependentAurasAndCasts(pItem);
|
||||
|
||||
// update expertise
|
||||
if ( slot == EQUIPMENT_SLOT_MAINHAND )
|
||||
UpdateExpertise(BASE_ATTACK);
|
||||
else if( slot == EQUIPMENT_SLOT_OFFHAND )
|
||||
UpdateExpertise(OFF_ATTACK);
|
||||
|
||||
// equipment visual show
|
||||
SetVisibleItemSlot(slot,NULL);
|
||||
}
|
||||
// need update known currency
|
||||
else if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END)
|
||||
UpdateKnownCurrencies(pItem->GetEntry(),false);
|
||||
|
||||
m_items[slot] = NULL;
|
||||
}
|
||||
|
|
@ -19859,7 +19890,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
if(CurTalentPoints == 0)
|
||||
return;
|
||||
|
||||
if (talentRank > 4)
|
||||
if (talentRank >= MAX_TALENT_RANK)
|
||||
return;
|
||||
|
||||
TalentEntry const *talentInfo = sTalentStore.LookupEntry( talentId );
|
||||
|
|
@ -19878,7 +19909,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
|
||||
// find current max talent rank
|
||||
int32 curtalent_maxrank = 0;
|
||||
for(int32 k = 4; k > -1; --k)
|
||||
for(int32 k = MAX_TALENT_RANK-1; k > -1; --k)
|
||||
{
|
||||
if(talentInfo->RankID[k] && HasSpell(talentInfo->RankID[k]))
|
||||
{
|
||||
|
|
@ -19901,7 +19932,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
if(TalentEntry const *depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn))
|
||||
{
|
||||
bool hasEnoughRank = false;
|
||||
for (int i = talentInfo->DependsOnRank; i <= 4; i++)
|
||||
for (int i = talentInfo->DependsOnRank; i < MAX_TALENT_RANK; i++)
|
||||
{
|
||||
if (depTalentInfo->RankID[i] != 0)
|
||||
if (HasSpell(depTalentInfo->RankID[i]))
|
||||
|
|
@ -19927,7 +19958,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
{
|
||||
if (tmpTalent->TalentTab == tTab)
|
||||
{
|
||||
for (int j = 0; j <= 4; j++)
|
||||
for (int j = 0; j < MAX_TALENT_RANK; j++)
|
||||
{
|
||||
if (tmpTalent->RankID[j] != 0)
|
||||
{
|
||||
|
|
@ -19943,7 +19974,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
|||
}
|
||||
|
||||
// not have required min points spent in talent tree
|
||||
if(spentPoints < (talentInfo->Row * 5))
|
||||
if(spentPoints < (talentInfo->Row * MAX_TALENT_RANK))
|
||||
return;
|
||||
|
||||
// spell not set in talent.dbc
|
||||
|
|
@ -19981,7 +20012,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
|||
if(CurTalentPoints == 0)
|
||||
return;
|
||||
|
||||
if (talentRank > 2)
|
||||
if (talentRank >= MAX_PET_TALENT_RANK)
|
||||
return;
|
||||
|
||||
TalentEntry const *talentInfo = sTalentStore.LookupEntry(talentId);
|
||||
|
|
@ -20013,7 +20044,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
|||
|
||||
// find current max talent rank
|
||||
int32 curtalent_maxrank = 0;
|
||||
for(int32 k = 4; k > -1; --k)
|
||||
for(int32 k = MAX_TALENT_RANK-1; k > -1; --k)
|
||||
{
|
||||
if(talentInfo->RankID[k] && pet->HasSpell(talentInfo->RankID[k]))
|
||||
{
|
||||
|
|
@ -20036,7 +20067,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
|||
if(TalentEntry const *depTalentInfo = sTalentStore.LookupEntry(talentInfo->DependsOn))
|
||||
{
|
||||
bool hasEnoughRank = false;
|
||||
for (int i = talentInfo->DependsOnRank; i <= 4; i++)
|
||||
for (int i = talentInfo->DependsOnRank; i < MAX_TALENT_RANK; i++)
|
||||
{
|
||||
if (depTalentInfo->RankID[i] != 0)
|
||||
if (pet->HasSpell(depTalentInfo->RankID[i]))
|
||||
|
|
@ -20062,7 +20093,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
|||
{
|
||||
if (tmpTalent->TalentTab == tTab)
|
||||
{
|
||||
for (int j = 0; j <= 4; j++)
|
||||
for (int j = 0; j < MAX_TALENT_RANK; j++)
|
||||
{
|
||||
if (tmpTalent->RankID[j] != 0)
|
||||
{
|
||||
|
|
@ -20078,7 +20109,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
|||
}
|
||||
|
||||
// not have required min points spent in talent tree
|
||||
if(spentPoints < (talentInfo->Row * 3))
|
||||
if(spentPoints < (talentInfo->Row * MAX_PET_TALENT_RANK))
|
||||
return;
|
||||
|
||||
// spell not set in talent.dbc
|
||||
|
|
@ -20095,12 +20126,23 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
|||
|
||||
// learn! (other talent ranks will unlearned at learning)
|
||||
pet->learnSpell(spellid);
|
||||
sLog.outDetail("TalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
|
||||
sLog.outDetail("PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
|
||||
|
||||
// update free talent points
|
||||
pet->SetFreeTalentPoints(CurTalentPoints - (talentRank - curtalent_maxrank + 1));
|
||||
}
|
||||
|
||||
void Player::UpdateKnownCurrencies(uint32 itemId, bool apply)
|
||||
{
|
||||
if(CurrencyTypesEntry const* ctEntry = sCurrencyTypesStore.LookupEntry(itemId))
|
||||
{
|
||||
if(apply)
|
||||
SetFlag64(PLAYER_FIELD_KNOWN_CURRENCIES,(1LL << (ctEntry->BitIndex-1)));
|
||||
else
|
||||
RemoveFlag64(PLAYER_FIELD_KNOWN_CURRENCIES,(1LL << (ctEntry->BitIndex-1)));
|
||||
}
|
||||
}
|
||||
|
||||
void Player::BuildPlayerTalentsInfoData(WorldPacket *data)
|
||||
{
|
||||
*data << uint32(GetFreeTalentPoints()); // unspentTalentPoints
|
||||
|
|
|
|||
|
|
@ -2358,6 +2358,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||
uint8 _CanStoreItem_InBag( uint8 bag, ItemPosCountVec& dest, ItemPrototype const *pProto, uint32& count, bool merge, bool non_specialized, Item *pSrcItem, uint8 skip_bag, uint8 skip_slot ) const;
|
||||
uint8 _CanStoreItem_InInventorySlots( uint8 slot_begin, uint8 slot_end, ItemPosCountVec& dest, ItemPrototype const *pProto, uint32& count, bool merge, Item *pSrcItem, uint8 skip_bag, uint8 skip_slot ) const;
|
||||
Item* _StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, bool update );
|
||||
void UpdateKnownCurrencies(uint32 itemId, bool apply);
|
||||
|
||||
void AdjustQuestReqItemCount( Quest const* pQuest, QuestStatusData& questStatusData );
|
||||
|
||||
|
|
|
|||
|
|
@ -1326,6 +1326,19 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
|
||||
// Get spell max affected targets
|
||||
uint32 unMaxTargets = m_spellInfo->MaxAffectedTargets;
|
||||
|
||||
// custom target amount cases
|
||||
switch(m_spellInfo->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_DRUID:
|
||||
// Starfall
|
||||
if (m_spellInfo->SpellFamilyFlags2 & 0x00000100LL)
|
||||
unMaxTargets = 2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
|
||||
for(Unit::AuraList::const_iterator m = mod.begin(); m != mod.end(); ++m)
|
||||
{
|
||||
|
|
@ -1333,6 +1346,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
continue;
|
||||
unMaxTargets+=(*m)->GetModifier()->m_amount;
|
||||
}
|
||||
|
||||
switch(cur)
|
||||
{
|
||||
case TARGET_TOTEM_EARTH:
|
||||
|
|
|
|||
|
|
@ -1370,6 +1370,18 @@ void Spell::EffectDummy(uint32 i)
|
|||
// Starfall
|
||||
if (m_spellInfo->SpellFamilyFlags2 & 0x00000100LL)
|
||||
{
|
||||
//Shapeshifting into an animal form or mounting cancels the effect.
|
||||
if(m_caster->GetCreatureType() == CREATURE_TYPE_BEAST || m_caster->IsMounted())
|
||||
{
|
||||
if(m_triggeredByAuraSpell)
|
||||
m_caster->RemoveAurasDueToSpell(m_triggeredByAuraSpell->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
//Any effect which causes you to lose control of your character will supress the starfall effect.
|
||||
if(m_caster->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_FLEEING | UNIT_STAT_ROOT | UNIT_STAT_CONFUSED))
|
||||
return;
|
||||
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 50286: m_caster->CastSpell(unitTarget, 50288, true); return;
|
||||
|
|
|
|||
|
|
@ -530,6 +530,7 @@ bool IsSingleTargetSpells(SpellEntry const *spellInfo1, SpellEntry const *spellI
|
|||
switch(spec1)
|
||||
{
|
||||
case SPELL_JUDGEMENT:
|
||||
case SPELL_MAGE_POLYMORPH:
|
||||
if(GetSpellSpecific(spellInfo2->Id) == spec1)
|
||||
return true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayI
|
|||
DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
|
||||
DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt);
|
||||
DBCStorage <CreatureTypeEntry> sCreatureTypeStore(CreatureTypefmt);
|
||||
DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore(CurrencyTypesfmt);
|
||||
|
||||
DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore(DurabilityQualityfmt);
|
||||
DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore(DurabilityCostsfmt);
|
||||
|
|
@ -77,6 +78,7 @@ DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore(GtRegenHPPerSptf
|
|||
DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore(GtRegenMPPerSptfmt);
|
||||
DBCStorage <HolidaysEntry> sHolidaysStore(Holidaysfmt);
|
||||
DBCStorage <ItemEntry> sItemStore(Itemfmt);
|
||||
DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore(ItemBagFamilyfmt);
|
||||
//DBCStorage <ItemCondExtCostsEntry> sItemCondExtCostsStore(ItemCondExtCostsEntryfmt);
|
||||
//DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently
|
||||
DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore(ItemExtendedCostEntryfmt);
|
||||
|
|
@ -191,7 +193,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
{
|
||||
std::string dbcPath = dataPath+"dbc/";
|
||||
|
||||
const uint32 DBCFilesCount = 73;
|
||||
const uint32 DBCFilesCount = 75;
|
||||
|
||||
barGoLink bar( DBCFilesCount );
|
||||
|
||||
|
|
@ -232,6 +234,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureFamilyStore, dbcPath,"CreatureFamily.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureSpellDataStore, dbcPath,"CreatureSpellData.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureTypeStore, dbcPath,"CreatureType.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCurrencyTypesStore, dbcPath,"CurrencyTypes.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sDurabilityCostsStore, dbcPath,"DurabilityCosts.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sDurabilityQualityStore, dbcPath,"DurabilityQuality.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sEmotesTextStore, dbcPath,"EmotesText.dbc");
|
||||
|
|
@ -266,6 +269,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sGtRegenMPPerSptStore, dbcPath,"gtRegenMPPerSpt.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sHolidaysStore, dbcPath,"Holidays.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemStore, dbcPath,"Item.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemBagFamilyStore, dbcPath,"ItemBagFamily.dbc");
|
||||
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemDisplayInfoStore, dbcPath,"ItemDisplayInfo.dbc"); -- not used currently
|
||||
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemCondExtCostsStore, dbcPath,"ItemCondExtCosts.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sItemExtendedCostStore, dbcPath,"ItemExtendedCost.dbc");
|
||||
|
|
@ -340,7 +344,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
{
|
||||
TalentEntry const *talentInfo = sTalentStore.LookupEntry(i);
|
||||
if (!talentInfo) continue;
|
||||
for (int j = 0; j < 5; j++)
|
||||
for (int j = 0; j < MAX_TALENT_RANK; j++)
|
||||
if(talentInfo->RankID[j])
|
||||
sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(i,j);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
|
|||
extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
|
||||
extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
|
||||
extern DBCStorage <CreatureTypeEntry> sCreatureTypeStore;
|
||||
extern DBCStorage <CurrencyTypesEntry> sCurrencyTypesStore;
|
||||
extern DBCStorage <DurabilityCostsEntry> sDurabilityCostsStore;
|
||||
extern DBCStorage <DurabilityQualityEntry> sDurabilityQualityStore;
|
||||
extern DBCStorage <EmotesTextEntry> sEmotesTextStore;
|
||||
|
|
@ -167,6 +168,7 @@ extern DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore;
|
|||
extern DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore;
|
||||
extern DBCStorage <HolidaysEntry> sHolidaysStore;
|
||||
extern DBCStorage <ItemEntry> sItemStore;
|
||||
extern DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore;
|
||||
//extern DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore; -- not used currently
|
||||
extern DBCStorage <ItemExtendedCostEntry> sItemExtendedCostStore;
|
||||
extern DBCStorage <ItemLimitCategoryEntry> sItemLimitCategoryStore;
|
||||
|
|
|
|||
|
|
@ -698,6 +698,23 @@ struct CreatureTypeEntry
|
|||
//uint32 no_expirience; // 18 no exp? critters, non-combat pets, gas cloud.
|
||||
};
|
||||
|
||||
/* not used
|
||||
struct CurrencyCategoryEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
uint32 Unk1; // 1 0 for known categories and 3 for unknown one (3.0.9)
|
||||
char* Name[16]; // 2-17 name
|
||||
// // 18 string flags
|
||||
};
|
||||
*/
|
||||
|
||||
struct CurrencyTypesEntry
|
||||
{
|
||||
//uint32 ID; // 0 not used
|
||||
uint32 ItemId; // 1 used as real index
|
||||
uint32 BitIndex; // 2 bit index in PLAYER_FIELD_KNOWN_CURRENCIES (1 << (index-1))
|
||||
};
|
||||
|
||||
struct DurabilityCostsEntry
|
||||
{
|
||||
uint32 Itemlvl; // 0
|
||||
|
|
@ -902,6 +919,13 @@ struct ItemEntry
|
|||
uint32 Sheath; // 7
|
||||
};
|
||||
|
||||
struct ItemBagFamilyEntry
|
||||
{
|
||||
uint32 ID; // 0
|
||||
//char* name[16] // 1-16 m_name_lang
|
||||
// // 17 name flags
|
||||
};
|
||||
|
||||
struct ItemDisplayInfoEntry
|
||||
{
|
||||
uint32 ID; // 0 m_ID
|
||||
|
|
@ -1400,13 +1424,16 @@ struct StableSlotPricesEntry
|
|||
uint32 Flags; // 5
|
||||
};*/
|
||||
|
||||
#define MAX_TALENT_RANK 5
|
||||
#define MAX_PET_TALENT_RANK 3 // use in calculations, expected <= MAX_TALENT_RANK
|
||||
|
||||
struct TalentEntry
|
||||
{
|
||||
uint32 TalentID; // 0
|
||||
uint32 TalentTab; // 1 index in TalentTab.dbc (TalentTabEntry)
|
||||
uint32 Row; // 2
|
||||
uint32 Col; // 3
|
||||
uint32 RankID[5]; // 4-8
|
||||
uint32 RankID[MAX_TALENT_RANK]; // 4-8
|
||||
// 9-12 not used, always 0, maybe not used high ranks
|
||||
uint32 DependsOn; // 13 index in Talent.dbc (TalentEntry)
|
||||
// 14-15 not used
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ const char CreatureDisplayInfofmt[]="nxxxfxxxxxxxxxxx";
|
|||
const char CreatureFamilyfmt[]="nfifiiiiixssssssssssssssssxx";
|
||||
const char CreatureSpellDatafmt[]="nxxxxxxxx";
|
||||
const char CreatureTypefmt[]="nxxxxxxxxxxxxxxxxxx";
|
||||
const char CurrencyTypesfmt[]="xnxi";
|
||||
const char DurabilityCostsfmt[]="niiiiiiiiiiiiiiiiiiiiiiiiiiiii";
|
||||
const char DurabilityQualityfmt[]="nf";
|
||||
const char EmoteEntryfmt[]="nxixxxxxxxxxxxxxxxx";
|
||||
|
|
@ -55,6 +56,7 @@ const char GtRegenHPPerSptfmt[]="f";
|
|||
const char GtRegenMPPerSptfmt[]="f";
|
||||
const char Holidaysfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char Itemfmt[]="nixiiiii";
|
||||
const char ItemBagFamilyfmt[]="nxxxxxxxxxxxxxxxxx";
|
||||
//const char ItemDisplayTemplateEntryfmt[]="nxxxxxxxxxxixxxxxxxxxxx";
|
||||
//const char ItemCondExtCostsEntryfmt[]="xiii";
|
||||
const char ItemExtendedCostEntryfmt[]="niiiiiiiiiiiiix";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7508"
|
||||
#define REVISION_NR "7517"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue