*Allow players to capture siege workshops in wintergrasp.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-12 08:51:51 -05:00
parent cd78172c7d
commit 99eafd6a52
11 changed files with 216 additions and 116 deletions
+4 -4
View File
@@ -268,9 +268,9 @@ void OPvPCapturePointHP::ChangeState()
void OPvPCapturePointHP::SendChangePhase()
{
SendUpdateWorldState(HP_UI_TOWER_SLIDER_N, m_NeutralValue);
SendUpdateWorldState(HP_UI_TOWER_SLIDER_N, m_neutralValuePct);
// send these updates to only the ones in this objective
uint32 phase = (uint32)ceil(( m_ShiftPhase + m_ShiftMaxPhase) / ( 2 * m_ShiftMaxPhase ) * 100.0f);
uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f);
SendUpdateWorldState(HP_UI_TOWER_SLIDER_POS, phase);
// send this too, sometimes the slider disappears, dunno why :(
SendUpdateWorldState(HP_UI_TOWER_SLIDER_DISPLAY, 1);
@@ -308,9 +308,9 @@ bool OPvPCapturePointHP::HandlePlayerEnter(Player *plr)
if(OPvPCapturePoint::HandlePlayerEnter(plr))
{
plr->SendUpdateWorldState(HP_UI_TOWER_SLIDER_DISPLAY, 1);
uint32 phase = (uint32)ceil(( m_ShiftPhase + m_ShiftMaxPhase) / ( 2 * m_ShiftMaxPhase ) * 100.0f);
uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f);
plr->SendUpdateWorldState(HP_UI_TOWER_SLIDER_POS, phase);
plr->SendUpdateWorldState(HP_UI_TOWER_SLIDER_N, m_NeutralValue);
plr->SendUpdateWorldState(HP_UI_TOWER_SLIDER_N, m_neutralValuePct);
return true;
}
return false;