mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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)
|
||||
{
|
||||
// not allow declare war to own faction
|
||||
if(atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) )
|
||||
// not allow declare war to faction unless already hated or less
|
||||
if (atWar && (faction->Flags & FACTION_FLAG_PEACE_FORCED) && ReputationToRank(faction->Standing) > REP_HATED)
|
||||
return;
|
||||
|
||||
// already set
|
||||
|
|
|
|||
|
|
@ -1700,27 +1700,22 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
|||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
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];
|
||||
int32 rep_change = m_currentBasePoints[EFFECT_INDEX_1];
|
||||
uint32 faction_id = m_currentBasePoints[eff_idx];
|
||||
int32 rep_change = m_currentBasePoints[EFFECT_INDEX_1];
|
||||
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
|
||||
FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction_id);
|
||||
|
||||
if (!factionEntry)
|
||||
return;
|
||||
if (!factionEntry)
|
||||
return;
|
||||
|
||||
// set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated)
|
||||
pPlayer->GetReputationMgr().SetReputation(factionEntry, rep_change);
|
||||
break;
|
||||
}
|
||||
case EFFECT_INDEX_2:
|
||||
// unclear what this effect is for.
|
||||
break;
|
||||
// set rep to baserep + basepoints (expecting spillover for oposite faction -> become hated)
|
||||
pPlayer->GetReputationMgr().SetReputation(factionEntry, rep_change);
|
||||
|
||||
// EFFECT_INDEX_2 most likely update at war state, we already handle this in SetReputation
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10696"
|
||||
#define REVISION_NR "10697"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue