108 lines
3.1 KiB
C++
108 lines
3.1 KiB
C++
#include "stdafx.h"
|
|
#include "ArenaJoinSituationConcreter.h"
|
|
#include "Arena\\ArenaSystem.h"
|
|
#include "SGameLocalPlayer.h"
|
|
#include "SGameSystem.h"
|
|
#include "SGameWorld.h"
|
|
|
|
extern SGameSystem * g_pCurrentGameSystem;
|
|
|
|
bool cSituationConcreterNone::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
bool cSituationConcreterDeath::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
if (!localPlayer)
|
|
return false;
|
|
if (localPlayer->IsDead())
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterTrade::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
if (g_pCurrentGameSystem->isTrading())
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterSiegePlaying::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
int playerLocation = gameWorld->GetPlayerCurrentLocation();
|
|
if (PLAYER_IN_DUNGEON_SIEGE == playerLocation || PLAYER_IN_DUNGEON_RAID == playerLocation)
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterInstancePlaying::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
int playerLocation = gameWorld->GetPlayerCurrentLocation();
|
|
if (PLAYER_IN_INSTANCE_DUNGEON_AUTO == playerLocation)
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterPenalty::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
sArenaSystem* arenaSystem = g_pCurrentGameSystem->getArenaSystem();
|
|
if (0 < arenaSystem->getPenaltyCount())
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterPartyPlaying::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
if (g_pCurrentGameSystem->isParting())
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterNormalPartyPlaying::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
if (g_pCurrentGameSystem->isNormalParting())
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterArenaPlaying::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
if (!localPlayer)
|
|
return false;
|
|
sArenaSystem* arenaSystem = g_pCurrentGameSystem->getArenaSystem();
|
|
if (!arenaSystem->isJoin())
|
|
return false;
|
|
/// battle info를 받으면 실제 경기 중이 아니라도 경기에 참여 했기 때문에, 경기중으로 생각해야 된다.
|
|
if (arenaSystem->isRecvBattleInfo())
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterArenaWaiting::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
if (!localPlayer)
|
|
return false;
|
|
sArenaSystem* arenaSystem = g_pCurrentGameSystem->getArenaSystem();
|
|
if (arenaSystem->isJoin() && !arenaSystem->isRecvBattleInfo())
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
bool cSituationConcreterArenaWaitingCount::isSatisfaction(SGameWorld const* gameWorld, SGameLocalPlayer const* localPlayer)
|
|
{
|
|
if (!localPlayer)
|
|
return false;
|
|
sArenaSystem* arenaSystem = g_pCurrentGameSystem->getArenaSystem();
|
|
if (!arenaSystem->isJoin())
|
|
return false;
|
|
if (!arenaSystem->isRecvBattleInfo())
|
|
return false;
|
|
if (arenaSystem->isWaiting())
|
|
return true;
|
|
|
|
return false;
|
|
}
|