mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10697] Less strict check for update at war state for factions
Clarify in comments of recent added spell dummy effect Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
9508001213
commit
b4a48f976e
3 changed files with 14 additions and 19 deletions
|
|
@ -375,8 +375,8 @@ void ReputationMgr::SetAtWar( RepListID repListID, bool on )
|
||||||
|
|
||||||
void ReputationMgr::SetAtWar(FactionState* faction, bool atWar)
|
void ReputationMgr::SetAtWar(FactionState* faction, bool atWar)
|
||||||
{
|
{
|
||||||
// not allow declare war to own faction
|
// not allow declare war to faction unless already hated or less
|
||||||
if(atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) )
|
if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) && ReputationToRank(faction->Standing) > REP_HATED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// already set
|
// already set
|
||||||
|
|
|
||||||
|
|
@ -1700,27 +1700,22 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
||||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch(eff_idx)
|
if (eff_idx == EFFECT_INDEX_0)
|
||||||
{
|
{
|
||||||
case EFFECT_INDEX_0:
|
Player* pPlayer = (Player*)m_caster;
|
||||||
{
|
|
||||||
Player* pPlayer = (Player*)m_caster;
|
|
||||||
|
|
||||||
uint32 faction_id = m_currentBasePoints[eff_idx];
|
uint32 faction_id = m_currentBasePoints[eff_idx];
|
||||||
int32 rep_change = m_currentBasePoints[EFFECT_INDEX_1];
|
int32 rep_change = m_currentBasePoints[EFFECT_INDEX_1];
|
||||||
|
|
||||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
|
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
|
||||||
|
|
||||||
if (!factionEntry)
|
if (!factionEntry)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated)
|
// set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated)
|
||||||
pPlayer->GetReputationMgr().SetReputation(factionEntry, rep_change);
|
pPlayer->GetReputationMgr().SetReputation(factionEntry, rep_change);
|
||||||
break;
|
|
||||||
}
|
// EFFECT_INDEX_2 most likely update at war state, we already handle this in SetReputation
|
||||||
case EFFECT_INDEX_2:
|
|
||||||
// unclear what this effect is for.
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10696"
|
#define REVISION_NR "10697"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue