void CNinja::Tick() { CCharacter *pOwner = GameServer()->GetPlayerChar(m_Owner); if(!pOwner) { Reset(); return; } if(!m_Visible) return; char aBuf[128]; int Click = pOwner->MouseEvent(m_Pos); if(!Click) { m_LastClick = 0; return; } switch(m_Type) { case 1: pOwner->Buy("Ninja permanent", &pOwner->GetPlayer()->m_AccData.m_NinjaPermanent, g_Config.m_EuNinjaPermanent, Click, 1); break; case 2: pOwner->Buy("Ninja at start", &pOwner->GetPlayer()->m_AccData.m_NinjaStart, g_Config.m_EuNinjaStart, Click, 1); break; case 3: pOwner->Buy("Ninja switch", &pOwner->GetPlayer()->m_AccData.m_NinjaSwitch, g_Config.m_EuNinjaSwitch, Click, 1); break; } }
void CNoSelfDMG::Tick() { CCharacter *pOwner = GameServer()->GetPlayerChar(m_Owner); if(!pOwner) { Reset(); return; } if(!m_Visible) return; char aBuf[128]; int Click = pOwner->MouseEvent(m_Pos); if(!Click) { m_LastClick = 0; return; } pOwner->Buy("No self damage", &pOwner->GetPlayer()->m_AccData.m_NoSelfDMG, g_Config.m_EuNoSelfDMG, Click, 1); }
void CBuyHealth::Tick() { for(int i = 0; i < MAX_CLIENTS; i++) { CCharacter *pUser = GameServer()->GetPlayerChar(i); if(!pUser) continue; int Click = pUser->MouseEvent(m_Pos-vec2(50,50)); int Click1 = pUser->MouseEvent(m_Pos-vec2(-50,50)); if(!Click && !Click1) { //m_LastClick = 0; continue; } pUser->Buy("Health", &pUser->GetPlayer()->m_AccData.m_Health, g_Config.m_EuHealth, Click, 500); pUser->Buy("Armor", &pUser->GetPlayer()->m_AccData.m_Armor, g_Config.m_EuArmor, Click1, 500); } }
void CFastReload::Tick() { CCharacter *pOwner = GameServer()->GetPlayerChar(m_Owner); if(!pOwner) { Reset(); return; } if(!m_Visible) return; char aBuf[128]; int Click = pOwner->MouseEvent(m_Pos); if(!Click) { m_LastClick = 0; return; } pOwner->Buy("Fast reload", &pOwner->GetPlayer()->m_AccData.m_FastReload, g_Config.m_EuFastReload, Click, 10); }
void CHealthRegen::Tick() { CCharacter *pOwner = GameServer()->GetPlayerChar(m_Owner); if(!pOwner) { Reset(); return; } if(!m_Visible) return; char aBuf[128]; int Click = pOwner->MouseEvent(m_Pos); if(!Click) { m_LastClick = 0; return; } pOwner->Buy("Health regeneration", &pOwner->GetPlayer()->m_AccData.m_HealthRegen, g_Config.m_EuHealthRegen, Click, 25); }