Tiny setPVPMode fix
This commit is contained in:
parent
4d656f8bd1
commit
69ae324676
|
@ -141,7 +141,7 @@ function online()
|
||||||
g_game.setFightMode(lastCombatControls[char].fightMode)
|
g_game.setFightMode(lastCombatControls[char].fightMode)
|
||||||
g_game.setChaseMode(lastCombatControls[char].chaseMode)
|
g_game.setChaseMode(lastCombatControls[char].chaseMode)
|
||||||
g_game.setSafeFight(lastCombatControls[char].safeFight)
|
g_game.setSafeFight(lastCombatControls[char].safeFight)
|
||||||
if g_game.getFeature(GamePVPMode) and lastCombatControls[char].pvpMode then
|
if lastCombatControls[char].pvpMode then
|
||||||
g_game.setPVPMode(lastCombatControls[char].pvpMode)
|
g_game.setPVPMode(lastCombatControls[char].pvpMode)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -245,9 +245,7 @@ function onSetPVPMode(self, selectedPVPButton)
|
||||||
pvpMode = PVPRedFist
|
pvpMode = PVPRedFist
|
||||||
end
|
end
|
||||||
|
|
||||||
if g_game.getFeature(GamePVPMode) then
|
|
||||||
g_game.setPVPMode(pvpMode)
|
g_game.setPVPMode(pvpMode)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function onMiniWindowClose()
|
function onMiniWindowClose()
|
||||||
|
|
|
@ -1229,6 +1229,8 @@ void Game::setPVPMode(Otc::PVPModes pvpMode)
|
||||||
{
|
{
|
||||||
if(!canPerformGameAction())
|
if(!canPerformGameAction())
|
||||||
return;
|
return;
|
||||||
|
if(!g_game.getFeature(Otc::GameFeature::PVPModes))
|
||||||
|
return;
|
||||||
if(m_pvpMode == pvpMode)
|
if(m_pvpMode == pvpMode)
|
||||||
return;
|
return;
|
||||||
m_pvpMode = pvpMode;
|
m_pvpMode = pvpMode;
|
||||||
|
|
Loading…
Reference in New Issue