aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/DBCStores.cpp11
-rw-r--r--src/game/DBCStores.h1
-rw-r--r--src/game/Language.h5
-rw-r--r--src/game/Pet.cpp2
-rw-r--r--src/game/Player.cpp23
-rw-r--r--src/game/SharedDefines.h2
-rw-r--r--src/game/SpellAuras.cpp1
-rw-r--r--src/game/SpellEffects.cpp2
-rw-r--r--src/game/Unit.cpp8
-rw-r--r--src/trinitycore/CliRunnable.cpp11
10 files changed, 42 insertions, 24 deletions
diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp
index 018b361616f..eed2e2c8a50 100644
--- a/src/game/DBCStores.cpp
+++ b/src/game/DBCStores.cpp
@@ -131,6 +131,7 @@ static uint32 sTalentTabPages[12/*MAX_CLASSES*/][3];
DBCStorage <TaxiNodesEntry> sTaxiNodesStore(TaxiNodesEntryfmt);
TaxiMask sTaxiNodesMask;
+TaxiMask sOldContinentsNodesMask;
// DBC used only for initialization sTaxiPathSetBySource at startup.
TaxiPathSetBySource sTaxiPathSetBySource;
@@ -456,9 +457,11 @@ void LoadDBCStores(const std::string& dataPath)
spellPaths.insert(sInfo->EffectMiscValue[j]);
memset(sTaxiNodesMask,0,sizeof(sTaxiNodesMask));
+ memset(sOldContinentsNodesMask,0,sizeof(sTaxiNodesMask));
for(uint32 i = 1; i < sTaxiNodesStore.GetNumRows(); ++i)
{
- if(!sTaxiNodesStore.LookupEntry(i))
+ TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(i);
+ if(!node)
continue;
TaxiPathSetBySource::const_iterator src_i = sTaxiPathSetBySource.find(i);
@@ -479,10 +482,14 @@ void LoadDBCStores(const std::string& dataPath)
continue;
}
- // valid taxi netowrk node
+ // valid taxi network node
uint8 field = (uint8)((i - 1) / 32);
uint32 submask = 1<<((i-1)%32);
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;
}
}
diff --git a/src/game/DBCStores.h b/src/game/DBCStores.h
index 4cad2b106c5..e79cb44a534 100644
--- a/src/game/DBCStores.h
+++ b/src/game/DBCStores.h
@@ -134,6 +134,7 @@ extern DBCStorage <TalentTabEntry> sTalentTabStore;
extern DBCStorage <TaxiNodesEntry> sTaxiNodesStore;
extern DBCStorage <TaxiPathEntry> sTaxiPathStore;
extern TaxiMask sTaxiNodesMask;
+extern TaxiMask sOldContinentsNodesMask;
extern TaxiPathSetBySource sTaxiPathSetBySource;
extern TaxiPathNodesByPath sTaxiPathNodesByPath;
extern DBCStorage <TotemCategoryEntry> sTotemCategoryStore;
diff --git a/src/game/Language.h b/src/game/Language.h
index 785ef9edf40..7a344bd2b41 100644
--- a/src/game/Language.h
+++ b/src/game/Language.h
@@ -731,7 +731,10 @@ enum TrinityStrings
LANG_CHARACTER_DELETED = 1009,
LANG_ACCOUNT_LIST_HEADER = 1010,
LANG_ACCOUNT_LIST_ERROR = 1011,
- // Room for more level 4 1012-1099 not used
+ LANG_ACCOUNT_LIST_BAR = 1012,
+ LANG_ACCOUNT_LIST_LINE = 1013,
+ LANG_ACCOUNT_LIST_EMPTY = 1014,
+ // Room for more level 4 1015-1099 not used
// Level 3 (continue)
LANG_ACCOUNT_SETADDON = 1100,
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index cf489a0b8e1..0cf0befb35d 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -1750,7 +1750,7 @@ void Pet::CastPetAura(PetAura const* aura)
void Pet::learnSpellHighRank(uint32 spellid)
{
- learnSpell(spellid,false);
+ learnSpell(spellid);
if(uint32 next = spellmgr.GetNextSpellInChain(spellid))
learnSpellHighRank(next);
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 548ddfc3c72..d0742c76faa 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -134,7 +134,18 @@ PlayerTaxi::PlayerTaxi()
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)
{
case RACE_HUMAN: SetTaximaskNode(2); break; // Human
@@ -150,12 +161,6 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 leve
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)
switch(Player::TeamForRace(race))
{
@@ -4588,9 +4593,7 @@ float Player::GetTotalBaseModValue(BaseModGroup modGroup) const
uint32 Player::GetShieldBlockValue() const
{
- BaseModGroup modGroup = SHIELD_BLOCK_VALUE;
-
- float value = GetTotalBaseModValue(modGroup) + GetStat(STAT_STRENGTH) * 0.5f - 10;
+ float value = (m_auraBaseMod[SHIELD_BLOCK_VALUE][FLAT_MOD] + GetStat(STAT_STRENGTH) * 0.5f - 10)*m_auraBaseMod[SHIELD_BLOCK_VALUE][PCT_MOD];
value = (value < 0) ? 0 : value;
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index 6c28aeea2c7..64973bcd080 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -358,7 +358,7 @@ enum SpellCategory
#define SPELL_ATTR_EX4_UNK3 0x00000008 // 3
#define SPELL_ATTR_EX4_UNK4 0x00000010 // 4 This will no longer cause guards to attack on use??
#define SPELL_ATTR_EX4_UNK5 0x00000020 // 5
-#define SPELL_ATTR_EX4_UNK6 0x00000040 // 6
+#define SPELL_ATTR_EX4_NOT_STEALABLE 0x00000040 // 6 although such auras might be dispellable, they cannot be stolen
#define SPELL_ATTR_EX4_UNK7 0x00000080 // 7
#define SPELL_ATTR_EX4_UNK8 0x00000100 // 8
#define SPELL_ATTR_EX4_UNK9 0x00000200 // 9
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 018d72a265a..8976aea2cb5 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1163,6 +1163,7 @@ void Aura::HandleAddModifier(bool apply, bool Real)
case 34754: // Clearcasting
case 34936: // Backlash
case 48108: // Hot Streak
+ case 51124: // Killing Machine
case 54741: // Firestarter
case 57761: // Fireball!
SetAuraCharges(1);
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d905eee7032..7e24bc4f81d 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -6274,7 +6274,7 @@ void Spell::EffectStealBeneficialBuff(uint32 i)
if (aur && (1<<aur->GetSpellProto()->Dispel) & dispelMask)
{
// Need check for passive? this
- if (aur->IsPositive() && !aur->IsPassive())
+ if (aur->IsPositive() && !aur->IsPassive() && !(aur->GetSpellProto()->AttributesEx4 & SPELL_ATTR_EX4_NOT_STEALABLE))
steal_list.push_back(aur);
}
}
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 056c2fa8952..c3b5a4a8f3e 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2682,8 +2682,8 @@ bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const *spellProto, WeaponAtt
((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_BLOCK )
return false;
- float blockChance = GetUnitBlockChance();
- blockChance += (GetWeaponSkillValue(attackType) - pVictim->GetMaxSkillValueForLevel() )*0.04;
+ float blockChance = pVictim->GetUnitBlockChance();
+ blockChance += (int32(GetWeaponSkillValue(attackType)) - int32(pVictim->GetMaxSkillValueForLevel()))*0.04f;
if (roll_chance_f(blockChance))
return true;
}
@@ -9269,8 +9269,8 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
DotTicks = DotDuration / spellProto->EffectAmplitude[x];
if(DotTicks)
{
- DoneAdvertisedBenefit /= DotTicks*int32(stack);
- TakenAdvertisedBenefit /= DotTicks*int32(stack);
+ DoneAdvertisedBenefit = DoneAdvertisedBenefit * int32(stack) / DotTicks;
+ TakenAdvertisedBenefit = TakenAdvertisedBenefit * int32(stack) / DotTicks;
}
}
}
diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp
index 4a681e0ed03..0f37535c8f4 100644
--- a/src/trinitycore/CliRunnable.cpp
+++ b/src/trinitycore/CliRunnable.cpp
@@ -168,12 +168,15 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args)
///- Get the list of accounts ID logged to the realm
QueryResult *resultDB = CharacterDatabase.Query("SELECT name,account FROM characters WHERE online > 0");
if (!resultDB)
+ {
+ SendSysMessage(LANG_ACCOUNT_LIST_EMPTY);
return true;
+ }
///- Display the list of account/characters online
- SendSysMessage("=====================================================================");
+ SendSysMessage(LANG_ACCOUNT_LIST_BAR);
SendSysMessage(LANG_ACCOUNT_LIST_HEADER);
- SendSysMessage("=====================================================================");
+ SendSysMessage(LANG_ACCOUNT_LIST_BAR);
///- Circle through accounts
do
@@ -190,7 +193,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args)
if(resultLogin)
{
Field *fieldsLogin = resultLogin->Fetch();
- PSendSysMessage("|%15s| %20s | %15s |%4d|%5d|",
+ PSendSysMessage(LANG_ACCOUNT_LIST_LINE,
fieldsLogin[0].GetString(),name.c_str(),fieldsLogin[1].GetString(),fieldsLogin[2].GetUInt32(),fieldsLogin[3].GetUInt32());
delete resultLogin;
@@ -202,7 +205,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args)
delete resultDB;
- SendSysMessage("=====================================================================");
+ SendSysMessage(LANG_ACCOUNT_LIST_BAR);
return true;
}