SYSERR: Dec 17 12:58:00 :: pid_init:
Start of pid: 766
SYSERR: Dec 17 13:01:53 :: ForAttrRegionFreeAngle: SECTREE_MANAGER::ForAttrRegion - Unhandled exception. MapIndex: 21
SYSERR: Dec 17 13:02:06 :: LoadSkillMotion: Motion: Skill exist but no motion data for index 0 mob 3596 skill 257
SYSERR: Dec 17 13:02:06 :: LoadSkillMotion: Motion: Skill exist but no motion data for index 1 mob 3596 skill 258
SYSERR: Dec 17 13:02:09 :: heart_idle: losing 244 seconds. (lag occured)
SYSERR: Dec 17 13:03:27 :: Analyze: login phase does not handle this packet! header 66
SYSERR: Dec 17 13:03:27 :: Analyze: login phase does not handle this packet! header 66
SYSERR: Dec 17 13:03:27 :: Analyze: login phase does not handle this packet! header 66
SYSERR: Dec 17 13:03:27 :: Analyze: login phase does not handle this packet! header 66
SYSERR: Dec 17 13:04:28 :: locale_find: LOCALE_ERROR: " Pvp will start after %d secunde with player %s ";
void CPVP::Packet(bool bDelete)
{
if (!m_players[0].dwVID || !m_players[1].dwVID)
{
if (bDelete)
sys_err("null vid when removing %u %u", m_players[0].dwVID, m_players[0].dwVID);
return 0;
}
else
{
if (info->time_second == 5)
pvpChr->EffectPacket(SE_DUEL_5);
else if (info->time_second == 4)
pvpChr->EffectPacket(SE_DUEL_4);
else if (info->time_second == 3)
pvpChr->EffectPacket(SE_DUEL_3);
else if (info->time_second == 2)
pvpChr->EffectPacket(SE_DUEL_2);
else if (info->time_second == 1)
pvpChr->EffectPacket(SE_DUEL_1);
if (info->time_second == 5)
pvpVictim->EffectPacket(SE_DUEL_5);
else if (info->time_second == 4)
pvpVictim->EffectPacket(SE_DUEL_4);
else if (info->time_second == 3)
pvpVictim->EffectPacket(SE_DUEL_3);
else if (info->time_second == 2)
pvpVictim->EffectPacket(SE_DUEL_2);
else if (info->time_second == 1)
pvpVictim->EffectPacket(SE_DUEL_1);
pvpChr->ChatPacket(CHAT_TYPE_INFO, LC_TEXT(" Pvp will start after %d secunde with player %s "), pvpVictim->GetName(), info->time_second);
pvpVictim->ChatPacket(CHAT_TYPE_INFO, LC_TEXT(" Pvp will start after %d secunde with player %s "), pvpChr->GetName(), info->time_second);
--info->time_second;
}
void CPVPManager::GiveUp(LPCHARACTER pkChr, DWORD dwKillerPID) // This method is calling from no where yet.
{
CPVPSetMap::iterator it = m_map_pkPVPSetByID.find(pkChr->GetPlayerID());
if (dwCompanionPID == dwKillerPID)
{
if (pkPVP->IsFight())
{
pkPVP->SetLastFightTime();
pkPVP->Win(dwKillerPID);
pkChr->EffectPacket(SE_DUEL_VICTIM_EFFECT);
LPCHARACTER tch = CHARACTER_MANAGER::instance().FindByPID(dwKillerPID);
if (tch)
tch->EffectPacket(SE_DUEL_KILLER_EFFECT);
found = true;
break;
}
else if (get_dword_time() - pkPVP->GetLastFightTime() <= 15000)
{
found = true;
break;
}
}
}
return found;
}
bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim)
{
switch (pkVictim->GetCharType())
{
case CHAR_TYPE_NPC:
case CHAR_TYPE_WARP:
case CHAR_TYPE_GOTO:
return false;
}
if (pkChr == pkVictim) // 내가 날 칠라고 하네 -_-
return false;
if (pkVictim->IsNPC() && pkChr->IsNPC() && !pkChr->IsGuardNPC())
return false;
if( true == pkChr->IsHorseRiding() )
{
if( pkChr->GetHorseLevel() > 0 && 1 == pkChr->GetHorseGrade() )
return false;
}
else
{
switch( pkChr->GetMountVnum() )
{
case 0:
case 20030:
case 20110:
case 20111:
case 20112:
case 20113:
case 20114:
case 20115:
case 20116:
case 20117:
case 20118:
//신규 탈것 고급
case 20205:
case 20206:
case 20207:
case 20208:
case 20209:
case 20210:
case 20211:
case 20212:
case 20119: // 라마단 흑마
case 20219: // 라마단 흑마 클론 (할로윈용)
case 20220: // 크리스마스 탈것
case 20221: // 전갑 백웅
case 20222: // 전갑 팬더
case 20120:
case 20121:
case 20122:
case 20123:
case 20124:
case 20125:
case 20214: // 난폭한 전갑순순록
case 20215: // 용맹한 전갑순순록
case 20217: // 난폭한 전갑암순록
case 20218: // 용맹한 전갑암순록
case 20224: // 난폭한 전갑석룡자
case 20225: // 용맹한 전갑석룡자
case 20226: // 유니콘
case 20227:
case 20229:
case 20230:
case 20231:
case 20232:
case 20233:
case 20234:
case 20235:
break;
default:
return false;
}
}
if (pkVictim->IsNPC() || pkChr->IsNPC())
{
return true;
}
if (pkVictim->IsObserverMode() || pkChr->IsObserverMode())
return false;
if (pkVictim->GetParty() && pkVictim->GetParty() == pkChr->GetParty())
{
return false;
// Cannot attack same party on any pvp model
}
else
{
if (pkVictim->IsKillerMode())
{
return true;
}
if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() >= 0)
{
if (g_protectNormalPlayer)
{
// 범법자는 평화모드인 착한사람을 공격할 수 없다.
if (PK_MODE_PEACE == pkVictim->GetPKMode())
return false;
}
}
switch (pkChr->GetPKMode())
{
case PK_MODE_PEACE:
case PK_MODE_REVENGE:
// Cannot attack same guild
if (pkVictim->GetGuild() && pkVictim->GetGuild() == pkChr->GetGuild())
break;
if (pkChr->GetPKMode() == PK_MODE_REVENGE)
{
//if (!g_iUseLocale)
if (1)
{
if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() >= 0)
{
pkChr->SetKillerMode(true);
return true;
}
else if (pkChr->GetAlignment() >= 0 && pkVictim->GetAlignment() < 0)
return true;
}
else
{
if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0)
break;
else if (pkChr->GetAlignment() >= 0 && pkVictim->GetAlignment() >= 0)
break;
beKillerMode = true;
}
}
break;
case PK_MODE_GUILD:
// Same implementation from PK_MODE_FREE except for attacking same guild
if (!pkChr->GetGuild() || (pkVictim->GetGuild() != pkChr->GetGuild()))
{
if (1)
//if (!g_iUseLocale)
{
if (pkVictim->GetAlignment() >= 0)
pkChr->SetKillerMode(true);
else if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0)
pkChr->SetKillerMode(true);
return true;
}
else
beKillerMode = true;
}
break;
case PK_MODE_FREE:
//if (!g_iUseLocale)
if (1)
{
if (pkVictim->GetAlignment() >= 0)
pkChr->SetKillerMode(true);
else if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0)
pkChr->SetKillerMode(true);
LC_TEXT(str) will use locale_string.txt to not hard-code the message, it's dynamic and can be modified easily to support different languages. Add it to the file or just make it static by removing the function call, that means:
Code:
pvpChr->ChatPacket(CHAT_TYPE_INFO, LC_TEXT(" Pvp will start after %d secunde with player %s "), pvpVictim->GetName(), info->time_second);
to
Code:
pvpChr->ChatPacket(CHAT_TYPE_INFO, " Pvp will start after %d secunde with player %s ", pvpVictim->GetName(), info->time_second);