Skip to content

Commit

Permalink
Merge + compile fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrus88 committed Nov 15, 2010
1 parent 4233bb0 commit a813bec
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
2 changes: 0 additions & 2 deletions src/game/DBCEnums.h
Expand Up @@ -254,8 +254,6 @@ enum AchievementCriteriaMoreReqType
ACHIEVEMENT_CRITERIA_MORE_REQ_TYPE_GUILD_REP = 62,
};

#define ACHIEVEMENT_CRITERIA_TYPE_TOTAL 124

enum AreaFlags
{
AREA_FLAG_SNOW = 0x00000001, // snow (only Dun Morogh, Naxxramas, Razorfen Downs and Winterspring)
Expand Down
6 changes: 4 additions & 2 deletions src/game/Player.cpp
Expand Up @@ -2747,10 +2747,12 @@ void Player::InitStatsForLevel(bool reapplyMods)
SetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE, 0.0f );

SetInt32Value(UNIT_FIELD_ATTACK_POWER, 0 );
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS, 0 );
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_POS, 0 );
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_NEG, 0 );
SetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER,0.0f);
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER, 0 );
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS,0 );
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS,0 );
SetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MOD_NEG,0 );
SetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER,0.0f);

// Base crit values (will be recalculated in UpdateAllStats() at loading and in _ApplyAllStatBonuses() at reset
Expand Down
4 changes: 2 additions & 2 deletions src/game/SpellEffects.cpp
Expand Up @@ -1717,11 +1717,11 @@ void Spell::EffectDummy(SpellEffectEntry const* effect)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;

if (eff_idx == EFFECT_INDEX_0)
if (effect->EffectIndex == EFFECT_INDEX_0)
{
Player* pPlayer = (Player*)m_caster;

uint32 faction_id = m_currentBasePoints[eff_idx];
uint32 faction_id = m_currentBasePoints[effect->EffectIndex];
int32 rep_change = m_currentBasePoints[EFFECT_INDEX_1];

FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
Expand Down
5 changes: 1 addition & 4 deletions src/game/SpellMgr.cpp
Expand Up @@ -3967,7 +3967,6 @@ void SpellMgr::CheckUsedSpells(char const* table)
spell, name.c_str(), familyMaskA, familyMaskB, code.c_str());
continue;
}

}
else
{
Expand All @@ -3976,7 +3975,6 @@ void SpellMgr::CheckUsedSpells(char const* table)
sLog.outError("Spell %u '%s' not fit to (" I64FMT "," I32FMT ") but used in %s.",spell,name.c_str(),familyMaskA,familyMaskB,code.c_str());
continue;
}

}
}

Expand Down Expand Up @@ -4013,7 +4011,6 @@ void SpellMgr::CheckUsedSpells(char const* table)
sLog.outError("Spell %u '%s' aura%d <> %u but used in %s.",spell,name.c_str(),effectIdx+1,auraType,code.c_str());
continue;
}

}
else
{
Expand Down Expand Up @@ -4066,7 +4063,7 @@ void SpellMgr::CheckUsedSpells(char const* table)
if (spellVisual >= 0 && spellEntry->SpellVisual[0] != uint32(spellVisual))
continue;

if(category >= 0 && spellEntry->GetCategory() != uint32(category)
if(category >= 0 && spellEntry->GetCategory() != uint32(category))
continue;

if (effectIdx >= 0)
Expand Down
10 changes: 5 additions & 5 deletions src/game/StatSystem.cpp
Expand Up @@ -252,13 +252,13 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
UnitMods unitMod = ranged ? UNIT_MOD_ATTACK_POWER_RANGED : UNIT_MOD_ATTACK_POWER;

uint16 index = UNIT_FIELD_ATTACK_POWER;
uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MODS;
uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MOD_POS;
uint16 index_mult = UNIT_FIELD_ATTACK_POWER_MULTIPLIER;

if(ranged)
{
index = UNIT_FIELD_RANGED_ATTACK_POWER;
index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MODS;
index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS;
index_mult = UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER;

switch(getClass())
Expand Down Expand Up @@ -809,13 +809,13 @@ void Creature::UpdateAttackPowerAndDamage(bool ranged)
UnitMods unitMod = ranged ? UNIT_MOD_ATTACK_POWER_RANGED : UNIT_MOD_ATTACK_POWER;

uint16 index = UNIT_FIELD_ATTACK_POWER;
uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MODS;
uint16 index_mod = UNIT_FIELD_ATTACK_POWER_MOD_POS;
uint16 index_mult = UNIT_FIELD_ATTACK_POWER_MULTIPLIER;

if(ranged)
{
index = UNIT_FIELD_RANGED_ATTACK_POWER;
index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MODS;
index_mod = UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS;
index_mult = UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER;
}

Expand Down Expand Up @@ -1032,7 +1032,7 @@ void Pet::UpdateAttackPowerAndDamage(bool ranged)
//UNIT_FIELD_(RANGED)_ATTACK_POWER field
SetInt32Value(UNIT_FIELD_ATTACK_POWER, (int32)base_attPower);
//UNIT_FIELD_(RANGED)_ATTACK_POWER_MODS field
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS, (int32)attPowerMod);
SetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_POS, (int32)attPowerMod);
//UNIT_FIELD_(RANGED)_ATTACK_POWER_MULTIPLIER field
SetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER, attPowerMultiplier);

Expand Down
4 changes: 2 additions & 2 deletions src/game/Unit.cpp
Expand Up @@ -9074,14 +9074,14 @@ float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const
{
if (attType == RANGED_ATTACK)
{
int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS);
int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MOD_POS);
if (ap < 0)
return 0.0f;
return ap * (1.0f + GetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER));
}
else
{
int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS);
int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MOD_POS);
if (ap < 0)
return 0.0f;
return ap * (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER));
Expand Down

17 comments on commit a813bec

@Stabatha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Tom, Still a lot of compile errors to SpellEntry::

This was on Win2003. Are you using Win or Linux to sucessfully compile Tom?

For example

11>game.lib(SpellEffects.obj) : error LNK2019: unresolved external symbol "public: unsigned int const * __thiscall SpellEntry::GetEffectSpellClassMask(enum SpellEffectIndex)const " (?GetEffectSpellClassMask@SpellEntry@@QBEPBIW4SpellEffectIndex@@@z) referenced in function "public: __thiscall PersistentAreaAura::PersistentAreaAura(class PersistentAreaAura const &)" (??0PersistentAreaAura@@QAE@ABV0@@z)
11>game.lib(SpellHandler.obj) : error LNK2001: unresolved external symbol "public: unsigned int const * __thiscall SpellEntry::GetEffectSpellClassMask(enum SpellEffectIndex)const " (?GetEffectSpellClassMask@SpellEntry@@QBEPBIW4SpellEffectIndex@@@z)
11>game.lib(ChatHandler.obj) : error LNK2001: unresolved external symbol "public: unsigned int const * __thiscall SpellEntry::GetEffectSpellClassMask(enum SpellEffectIndex)const " (?GetEffectSpellClassMask@SpellEntry@@QBEPBIW4SpellEffectIndex@@@z)

@tkcar
Copy link

@tkcar tkcar commented on a813bec Dec 5, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah
confirm

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated only vc100 projects. Expected for other VC versions, but with current unsupported state of branch not we care. ;)

@kicho
Copy link

@kicho kicho commented on a813bec Dec 6, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just add DBCStructure.cpp to VC80 or VC90 (which one are u using)

@waza123
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Salja
Copy link
Contributor

@Salja Salja commented on a813bec Dec 24, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls Merge from Master =(

@Ankso
Copy link

@Ankso Ankso commented on a813bec Jan 13, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any news about the development of this branch? I supose that the private RSA key is annoying the "oficial" development :S.

But I have a doubt, I know that patch the client is ilegal. But what about those launchers that modify memory at runtime, they are ilegal? anyway, mangos will never support such things, or I'm wrong?

@waza123
Copy link

@waza123 waza123 commented on a813bec Mar 6, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VladimirMangos
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next time publish XXX site URL. This can at least some fun.

@Salja
Copy link
Contributor

@Salja Salja commented on a813bec Mar 6, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha

@Wortex
Copy link

@Wortex Wortex commented on a813bec Mar 7, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vladimir, you pervert :D

@Wortex
Copy link

@Wortex Wortex commented on a813bec Mar 7, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MaNGOS+Pr0n=ArcEmu

@Stabatha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must still be a virgin if you compare the finer things in life like Mangos and porn to ARC =)

@Wortex
Copy link

@Wortex Wortex commented on a813bec Mar 7, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one whom speaks first about virgins, is the virgin. Note what I did there ? Ha! In yo face!

@Wortex
Copy link

@Wortex Wortex commented on a813bec Mar 7, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, even if I'd be a virgin, it doesn't count in Virtual Space as an aggravating and/or demoralizing term, therefore making your comment even more useless.

Hopefully, you misunderstood my statement: MaNGOS(Awsumness)+Pr0n(Meh)=ArcEmu(Shit). I bet that half(or maybe all) of ArcEmu's dev's code and watch Pr0n at the same time, that's why the stability of ArcEmu and feature rich content is really poor.

Anyways, this statement is useless for such "virgin" minded people as yourself Stabatha.

If you understood any of this, you'll reply with something intelligent, otherwise: another day, another child to pwn.

@Stabatha
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL at child to pwn.. I'm retired and have kids older then you ;) Seriously, please come up with more intelligent come backs then that.

@Wortex
Copy link

@Wortex Wortex commented on a813bec Mar 8, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly.

Please sign in to comment.