forked from metin2/server
remove all localization
This commit is contained in:
parent
83707434ee
commit
e1daa48366
|
@ -664,16 +664,6 @@ enum SPECIAL_EFFECT
|
||||||
SE_EQUIP_LOVE_PENDANT, // 발렌타인 사랑의 팬던트(71145) 착용할 때 이펙트 (발동이펙트임, 지속이펙트 아님)
|
SE_EQUIP_LOVE_PENDANT, // 발렌타인 사랑의 팬던트(71145) 착용할 때 이펙트 (발동이펙트임, 지속이펙트 아님)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
enum ETeenFlags
|
|
||||||
{
|
|
||||||
TEENFLAG_NONE = 0,
|
|
||||||
TEENFLAG_1HOUR,
|
|
||||||
TEENFLAG_2HOUR,
|
|
||||||
TEENFLAG_3HOUR,
|
|
||||||
TEENFLAG_4HOUR,
|
|
||||||
TEENFLAG_5HOUR,
|
|
||||||
};
|
|
||||||
|
|
||||||
#include "item_length.h"
|
#include "item_length.h"
|
||||||
|
|
||||||
// inventory의 position을 나타내는 구조체
|
// inventory의 position을 나타내는 구조체
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
/*********************************************************************
|
|
||||||
* date : 2007.06.07
|
|
||||||
* file : teen_packet.h
|
|
||||||
* author : mhh
|
|
||||||
* description :
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _teen_packet_h_
|
|
||||||
#define _teen_packet_h_
|
|
||||||
|
|
||||||
#define HEADER_GT_LOGIN 0x10
|
|
||||||
#define HEADER_GT_LOGOUT 0x11
|
|
||||||
|
|
||||||
|
|
||||||
#define HEADER_TG_TEEN_NOTICE 0x12
|
|
||||||
#define HEADER_TG_FORCE_LOGOUT 0x13
|
|
||||||
#define HEADER_TG_LOGIN_NOTICE 0x14
|
|
||||||
|
|
||||||
#endif /* _teen_packet_h_ */
|
|
||||||
|
|
|
@ -215,11 +215,6 @@ EVENTFUNC(oxevent_timer)
|
||||||
SendNoticeMap(LC_TEXT("No (X)"), OXEVENT_MAP_INDEX, true);
|
SendNoticeMap(LC_TEXT("No (X)"), OXEVENT_MAP_INDEX, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsJapan())
|
|
||||||
{
|
|
||||||
SendNoticeMap("??????X??O??????????B", OXEVENT_MAP_INDEX, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
SendNoticeMap(LC_TEXT("In 5 sec. everyone who gave an incorrect answer will be removed."), OXEVENT_MAP_INDEX, true);
|
SendNoticeMap(LC_TEXT("In 5 sec. everyone who gave an incorrect answer will be removed."), OXEVENT_MAP_INDEX, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1099,36 +1099,6 @@ bool CArena::RegisterObserverPtr(LPCHARACTER pChar)
|
||||||
|
|
||||||
bool CArenaManager::IsLimitedItem( int lMapIndex, DWORD dwVnum )
|
bool CArenaManager::IsLimitedItem( int lMapIndex, DWORD dwVnum )
|
||||||
{
|
{
|
||||||
if ( IsArenaMap( lMapIndex ) == true )
|
|
||||||
{
|
|
||||||
if ( LC_IsCanada() == true )
|
|
||||||
{
|
|
||||||
switch ( dwVnum )
|
|
||||||
{
|
|
||||||
case 50020:
|
|
||||||
case 50021:
|
|
||||||
case 50022:
|
|
||||||
case 50801:
|
|
||||||
case 50802:
|
|
||||||
case 50813:
|
|
||||||
case 50814:
|
|
||||||
case 50817:
|
|
||||||
case 50818:
|
|
||||||
case 50819:
|
|
||||||
case 50820:
|
|
||||||
case 50821:
|
|
||||||
case 50822:
|
|
||||||
case 50823:
|
|
||||||
case 50824:
|
|
||||||
case 50825:
|
|
||||||
case 50826:
|
|
||||||
case 71044:
|
|
||||||
case 71055:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,12 +208,6 @@ float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnor
|
||||||
int iARSrc;
|
int iARSrc;
|
||||||
int iERSrc;
|
int iERSrc;
|
||||||
|
|
||||||
if (LC_IsYMIR()) // 천마
|
|
||||||
{
|
|
||||||
iARSrc = std::min(90, pkAttacker->GetPolymorphPoint(POINT_DX));
|
|
||||||
iERSrc = std::min(90, pkVictim->GetPolymorphPoint(POINT_DX));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX);
|
int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX);
|
||||||
int attacker_lv = pkAttacker->GetLevel();
|
int attacker_lv = pkAttacker->GetLevel();
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
#include <common/teen_packet.h>
|
|
||||||
#include <common/VnumHelper.h>
|
#include <common/VnumHelper.h>
|
||||||
|
|
||||||
#include "char.h"
|
#include "char.h"
|
||||||
|
@ -598,7 +597,6 @@ void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE
|
||||||
if (m_stShopSign.length() == 0)
|
if (m_stShopSign.length() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (LC_IsCanada() == false)
|
|
||||||
{
|
{
|
||||||
if (CBanwordManager::instance().CheckString(m_stShopSign.c_str(), m_stShopSign.length()))
|
if (CBanwordManager::instance().CheckString(m_stShopSign.c_str(), m_stShopSign.length()))
|
||||||
{
|
{
|
||||||
|
@ -714,7 +712,6 @@ void CHARACTER::OpenMyShop(const char * c_pszSign, TShopItemTable * pTable, BYTE
|
||||||
RemoveAffect(AFFECT_MOUNT);
|
RemoveAffect(AFFECT_MOUNT);
|
||||||
RemoveAffect(AFFECT_MOUNT_BONUS);
|
RemoveAffect(AFFECT_MOUNT_BONUS);
|
||||||
}
|
}
|
||||||
//if (!LC_IsNewCIBN())
|
|
||||||
SetPolymorph(30000, true);
|
SetPolymorph(30000, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -735,7 +732,6 @@ void CHARACTER::CloseMyShop()
|
||||||
|
|
||||||
PacketAround(&p, sizeof(p));
|
PacketAround(&p, sizeof(p));
|
||||||
|
|
||||||
//if (!LC_IsNewCIBN())
|
|
||||||
SetPolymorph(GetJob(), true);
|
SetPolymorph(GetJob(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -861,15 +857,12 @@ void CHARACTER::EncodeInsertPacket(LPENTITY entity)
|
||||||
addPacket.dwMountVnum = GetMountVnum();
|
addPacket.dwMountVnum = GetMountVnum();
|
||||||
addPacket.bEmpire = m_bEmpire;
|
addPacket.bEmpire = m_bEmpire;
|
||||||
|
|
||||||
if (IsPC() == true && (LC_IsEurope() == true || LC_IsCanada() == true || LC_IsSingapore() == true))
|
if (IsPC() == true)
|
||||||
{
|
{
|
||||||
addPacket.dwLevel = GetLevel();
|
addPacket.dwLevel = GetLevel();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
addPacket.dwLevel = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
//TODO: what is this doing here?
|
||||||
if (false)
|
if (false)
|
||||||
{
|
{
|
||||||
LPCHARACTER ch = (LPCHARACTER) entity;
|
LPCHARACTER ch = (LPCHARACTER) entity;
|
||||||
|
@ -1302,12 +1295,6 @@ void CHARACTER::Disconnect(const char * c_pszReason)
|
||||||
|
|
||||||
LogManager::instance().CharLog(this, 0, "LOGOUT", buf);
|
LogManager::instance().CharLog(this, 0, "LOGOUT", buf);
|
||||||
|
|
||||||
if (LC_IsYMIR() || LC_IsKorea() || LC_IsBrazil())
|
|
||||||
{
|
|
||||||
int playTime = GetRealPoint(POINT_PLAYTIME) - m_dwLoginPlayTime;
|
|
||||||
LogManager::instance().LoginLog(false, GetDesc()->GetAccountTable().id, GetPlayerID(), GetLevel(), GetJob(), playTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_pWarMap)
|
if (m_pWarMap)
|
||||||
SetWarMap(NULL);
|
SetWarMap(NULL);
|
||||||
|
|
||||||
|
@ -1356,24 +1343,6 @@ void CHARACTER::Disconnect(const char * c_pszReason)
|
||||||
|
|
||||||
MessengerManager::instance().Logout(GetName());
|
MessengerManager::instance().Logout(GetName());
|
||||||
|
|
||||||
if (g_TeenDesc)
|
|
||||||
{
|
|
||||||
int offset = 0;
|
|
||||||
char buf[245] = {0};
|
|
||||||
|
|
||||||
buf[0] = HEADER_GT_LOGOUT;
|
|
||||||
offset += 1;
|
|
||||||
|
|
||||||
memset(buf+offset, 0x00, 2);
|
|
||||||
offset += 2;
|
|
||||||
|
|
||||||
TAccountTable &acc_table = GetDesc()->GetAccountTable();
|
|
||||||
memcpy(buf+offset, &acc_table.id, 4);
|
|
||||||
offset += 4;
|
|
||||||
|
|
||||||
g_TeenDesc->Packet(buf, offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GetDesc())
|
if (GetDesc())
|
||||||
{
|
{
|
||||||
GetDesc()->BindCharacter(NULL);
|
GetDesc()->BindCharacter(NULL);
|
||||||
|
@ -1880,10 +1849,7 @@ void CHARACTER::SetProto(const CMob * pkMob)
|
||||||
if (GetRaceNum() == xmas::MOB_SANTA_VNUM)
|
if (GetRaceNum() == xmas::MOB_SANTA_VNUM)
|
||||||
{
|
{
|
||||||
SetPoint(POINT_ATT_GRADE_BONUS, 10);
|
SetPoint(POINT_ATT_GRADE_BONUS, 10);
|
||||||
if (g_iUseLocale)
|
|
||||||
SetPoint(POINT_DEF_GRADE_BONUS, 6);
|
SetPoint(POINT_DEF_GRADE_BONUS, 6);
|
||||||
else
|
|
||||||
SetPoint(POINT_DEF_GRADE_BONUS, 15);
|
|
||||||
|
|
||||||
//산타용
|
//산타용
|
||||||
//m_dwPlayStartTime = get_dword_time() + 10 * 60 * 1000;
|
//m_dwPlayStartTime = get_dword_time() + 10 * 60 * 1000;
|
||||||
|
@ -2146,11 +2112,6 @@ void CHARACTER::ComputeBattlePoints()
|
||||||
iArmor += GetPoint(POINT_PARTY_DEFENDER_BONUS);
|
iArmor += GetPoint(POINT_PARTY_DEFENDER_BONUS);
|
||||||
|
|
||||||
// INTERNATIONAL_VERSION
|
// INTERNATIONAL_VERSION
|
||||||
if (LC_IsYMIR())
|
|
||||||
{
|
|
||||||
PointChange(POINT_DEF_GRADE, iShowDef + iArmor);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
PointChange(POINT_DEF_GRADE, iDef + iArmor);
|
PointChange(POINT_DEF_GRADE, iDef + iArmor);
|
||||||
PointChange(POINT_CLIENT_DEF_GRADE, (iShowDef + iArmor) - GetPoint(POINT_DEF_GRADE));
|
PointChange(POINT_CLIENT_DEF_GRADE, (iShowDef + iArmor) - GetPoint(POINT_DEF_GRADE));
|
||||||
|
@ -3020,25 +2981,6 @@ void CHARACTER::PointChange(BYTE type, int amount, bool bAmount, bool bBroadcast
|
||||||
DWORD exp = GetExp();
|
DWORD exp = GetExp();
|
||||||
DWORD next_exp = GetNextExp();
|
DWORD next_exp = GetNextExp();
|
||||||
|
|
||||||
// 청소년보호
|
|
||||||
if (LC_IsNewCIBN())
|
|
||||||
{
|
|
||||||
if (IsOverTime(OT_NONE))
|
|
||||||
{
|
|
||||||
SPDLOG_TRACE("<EXP_LOG> {} = NONE", GetName());
|
|
||||||
}
|
|
||||||
else if (IsOverTime(OT_3HOUR))
|
|
||||||
{
|
|
||||||
amount = (amount / 2);
|
|
||||||
SPDLOG_TRACE("<EXP_LOG> {} = 3HOUR", GetName());
|
|
||||||
}
|
|
||||||
else if (IsOverTime(OT_5HOUR))
|
|
||||||
{
|
|
||||||
amount = 0;
|
|
||||||
SPDLOG_TRACE("<EXP_LOG> {} = 5HOUR", GetName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// exp가 0 이하로 가지 않도록 한다
|
// exp가 0 이하로 가지 않도록 한다
|
||||||
if (amount < 0 && exp < -amount)
|
if (amount < 0 && exp < -amount)
|
||||||
{
|
{
|
||||||
|
@ -3294,25 +3236,6 @@ void CHARACTER::PointChange(BYTE type, int amount, bool bAmount, bool bBroadcast
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 청소년보호
|
|
||||||
if (LC_IsNewCIBN() && amount > 0)
|
|
||||||
{
|
|
||||||
if (IsOverTime(OT_NONE))
|
|
||||||
{
|
|
||||||
SPDLOG_TRACE("<GOLD_LOG> {} = NONE", GetName());
|
|
||||||
}
|
|
||||||
else if (IsOverTime(OT_3HOUR))
|
|
||||||
{
|
|
||||||
amount = (amount / 2);
|
|
||||||
SPDLOG_TRACE("<GOLD_LOG> {} = 3HOUR", GetName());
|
|
||||||
}
|
|
||||||
else if (IsOverTime(OT_5HOUR))
|
|
||||||
{
|
|
||||||
amount = 0;
|
|
||||||
SPDLOG_TRACE("<GOLD_LOG> {} = 5HOUR", GetName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SetGold(GetGold() + amount);
|
SetGold(GetGold() + amount);
|
||||||
val = GetGold();
|
val = GetGold();
|
||||||
}
|
}
|
||||||
|
@ -4646,17 +4569,9 @@ CHARACTER::PartyJoinErrCode CHARACTER::IsPartyJoinableCondition(const LPCHARACTE
|
||||||
|
|
||||||
static bool __party_can_join_by_level(LPCHARACTER leader, LPCHARACTER quest)
|
static bool __party_can_join_by_level(LPCHARACTER leader, LPCHARACTER quest)
|
||||||
{
|
{
|
||||||
|
//TODO: make the group level limit configurable
|
||||||
int level_limit = 30;
|
int level_limit = 30;
|
||||||
|
|
||||||
if (LC_IsCanada())
|
|
||||||
level_limit = 15;
|
|
||||||
else if (LC_IsBrazil() == true)
|
|
||||||
{
|
|
||||||
level_limit = 10;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
level_limit = 30;
|
|
||||||
|
|
||||||
return (abs(leader->GetLevel() - quest->GetLevel()) <= level_limit);
|
return (abs(leader->GetLevel() - quest->GetLevel()) <= level_limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4881,22 +4796,6 @@ void CHARACTER::OnClick(LPCHARACTER pkChrCauser)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 청소년은 퀘스트 못함
|
|
||||||
if (LC_IsNewCIBN())
|
|
||||||
{
|
|
||||||
if (pkChrCauser->IsOverTime(OT_3HOUR))
|
|
||||||
{
|
|
||||||
SPDLOG_DEBUG("Teen OverTime : name = {}, hour = {})", pkChrCauser->GetName(), 3);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (pkChrCauser->IsOverTime(OT_5HOUR))
|
|
||||||
{
|
|
||||||
SPDLOG_DEBUG("Teen OverTime : name = {}, hour = {})", pkChrCauser->GetName(), 5);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pkChrCauser->SetQuestNPCID(GetVID());
|
pkChrCauser->SetQuestNPCID(GetVID());
|
||||||
|
|
||||||
if (quest::CQuestManager::instance().Click(pkChrCauser->GetPlayerID(), this))
|
if (quest::CQuestManager::instance().Click(pkChrCauser->GetPlayerID(), this))
|
||||||
|
@ -5225,7 +5124,6 @@ bool CHARACTER::WarpSet(int x, int y, int lPrivateMapIndex)
|
||||||
|
|
||||||
GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
|
GetDesc()->Packet(&p, sizeof(TPacketGCWarp));
|
||||||
|
|
||||||
//if (!LC_IsNewCIBN())
|
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
snprintf(buf, sizeof(buf), "%s MapIdx %d DestMapIdx%d DestX%d DestY%d Empire%d", GetName(), GetMapIndex(), lPrivateMapIndex, x, y, GetEmpire());
|
snprintf(buf, sizeof(buf), "%s MapIdx %d DestMapIdx%d DestX%d DestY%d Empire%d", GetName(), GetMapIndex(), lPrivateMapIndex, x, y, GetEmpire());
|
||||||
|
@ -5695,10 +5593,7 @@ bool CHARACTER::BuildUpdatePartyPacket(TPacketGCPartyUpdate & out)
|
||||||
|
|
||||||
if (l && DISTANCE_APPROX(GetX() - l->GetX(), GetY() - l->GetY()) < PARTY_DEFAULT_RANGE)
|
if (l && DISTANCE_APPROX(GetX() - l->GetX(), GetY() - l->GetY()) < PARTY_DEFAULT_RANGE)
|
||||||
{
|
{
|
||||||
if (g_iUseLocale)
|
|
||||||
out.affects[0] = GetParty()->GetPartyBonusExpPercent();
|
out.affects[0] = GetParty()->GetPartyBonusExpPercent();
|
||||||
else
|
|
||||||
out.affects[0] = GetParty()->GetExpBonusPercent();
|
|
||||||
out.affects[1] = GetPoint(POINT_PARTY_ATTACKER_BONUS);
|
out.affects[1] = GetPoint(POINT_PARTY_ATTACKER_BONUS);
|
||||||
out.affects[2] = GetPoint(POINT_PARTY_TANKER_BONUS);
|
out.affects[2] = GetPoint(POINT_PARTY_TANKER_BONUS);
|
||||||
out.affects[3] = GetPoint(POINT_PARTY_BUFFER_BONUS);
|
out.affects[3] = GetPoint(POINT_PARTY_BUFFER_BONUS);
|
||||||
|
@ -6925,18 +6820,6 @@ EVENTFUNC(check_speedhack_event)
|
||||||
{
|
{
|
||||||
// write hack log
|
// write hack log
|
||||||
LogManager::instance().SpeedHackLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(), ch->m_speed_hack_count);
|
LogManager::instance().SpeedHackLog(ch->GetPlayerID(), ch->GetX(), ch->GetY(), ch->m_speed_hack_count);
|
||||||
|
|
||||||
if (false == LC_IsEurope())
|
|
||||||
{
|
|
||||||
// close connection
|
|
||||||
LPDESC desc = ch->GetDesc();
|
|
||||||
|
|
||||||
if (desc)
|
|
||||||
{
|
|
||||||
DESC_MANAGER::instance().DestroyDesc(desc);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ch->m_speed_hack_count = 0;
|
ch->m_speed_hack_count = 0;
|
||||||
|
|
|
@ -99,16 +99,7 @@ bool CHARACTER::UpdateAffect()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int iVal = 0;
|
int iVal = std::min(GetPoint(POINT_HP_RECOVERY), GetMaxHP() * 7 / 100);;
|
||||||
|
|
||||||
if (LC_IsYMIR())
|
|
||||||
{
|
|
||||||
iVal = std::min(GetPoint(POINT_HP_RECOVERY), GetMaxHP() * 9 / 100);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iVal = std::min(GetPoint(POINT_HP_RECOVERY), GetMaxHP() * 7 / 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
PointChange(POINT_HP, iVal);
|
PointChange(POINT_HP, iVal);
|
||||||
PointChange(POINT_HP_RECOVERY, -iVal);
|
PointChange(POINT_HP_RECOVERY, -iVal);
|
||||||
|
@ -121,12 +112,7 @@ bool CHARACTER::UpdateAffect()
|
||||||
PointChange(POINT_SP_RECOVERY, -GetPoint(POINT_SP_RECOVERY));
|
PointChange(POINT_SP_RECOVERY, -GetPoint(POINT_SP_RECOVERY));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int iVal;
|
int iVal = std::min(GetPoint(POINT_SP_RECOVERY), GetMaxSP() * 7 / 100);
|
||||||
|
|
||||||
if (!g_iUseLocale)
|
|
||||||
iVal = std::min(GetPoint(POINT_SP_RECOVERY), GetMaxSP() * 7 / 100);
|
|
||||||
else
|
|
||||||
iVal = std::min(GetPoint(POINT_SP_RECOVERY), GetMaxSP() * 7 / 100);
|
|
||||||
|
|
||||||
PointChange(POINT_SP, iVal);
|
PointChange(POINT_SP, iVal);
|
||||||
PointChange(POINT_SP_RECOVERY, -iVal);
|
PointChange(POINT_SP_RECOVERY, -iVal);
|
||||||
|
|
|
@ -302,17 +302,7 @@ void CHARACTER::DeathPenalty(BYTE bTown)
|
||||||
REMOVE_BIT(m_pointsInstant.instant_flag, INSTANT_FLAG_DEATH_PENALTY);
|
REMOVE_BIT(m_pointsInstant.instant_flag, INSTANT_FLAG_DEATH_PENALTY);
|
||||||
|
|
||||||
// NO_DEATH_PENALTY_BUG_FIX
|
// NO_DEATH_PENALTY_BUG_FIX
|
||||||
if (LC_IsYMIR()) // 천마 버전에서는 언제나 용신의 가호 아이템을 체크한다.
|
if (!bTown) // 국제 버전에서는 제자리 부활시만 용신의 가호를 사용한다. (마을 복귀시는 경험치 패널티 없음)
|
||||||
{
|
|
||||||
if (FindAffect(AFFECT_NO_DEATH_PENALTY))
|
|
||||||
{
|
|
||||||
SPDLOG_DEBUG("NO_DEATH_PENALTY_AFFECT({})", GetName());
|
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You did not lose any Experience because of the Blessing of the Dragon God."));
|
|
||||||
RemoveAffect(AFFECT_NO_DEATH_PENALTY);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!bTown) // 국제 버전에서는 제자리 부활시만 용신의 가호를 사용한다. (마을 복귀시는 경험치 패널티 없음)
|
|
||||||
{
|
{
|
||||||
if (FindAffect(AFFECT_NO_DEATH_PENALTY))
|
if (FindAffect(AFFECT_NO_DEATH_PENALTY))
|
||||||
{
|
{
|
||||||
|
@ -326,33 +316,12 @@ void CHARACTER::DeathPenalty(BYTE bTown)
|
||||||
|
|
||||||
int iLoss = ((GetNextExp() * aiExpLossPercents[std::clamp<int>(GetLevel(), 1, PLAYER_EXP_TABLE_MAX)]) / 100);
|
int iLoss = ((GetNextExp() * aiExpLossPercents[std::clamp<int>(GetLevel(), 1, PLAYER_EXP_TABLE_MAX)]) / 100);
|
||||||
|
|
||||||
if (true == LC_IsYMIR())
|
|
||||||
{
|
|
||||||
if (PLAYER_EXP_TABLE_MAX < GetLevel())
|
|
||||||
{
|
|
||||||
iLoss = std::min(500000, iLoss);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iLoss = std::min(200000, iLoss);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (true == LC_IsEurope())
|
|
||||||
{
|
|
||||||
iLoss = std::min(800000, iLoss);
|
iLoss = std::min(800000, iLoss);
|
||||||
}
|
|
||||||
|
|
||||||
if (bTown)
|
if (bTown)
|
||||||
{
|
|
||||||
if (g_iUseLocale)
|
|
||||||
{
|
{
|
||||||
iLoss = 0;
|
iLoss = 0;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
iLoss -= iLoss / 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IsEquipUniqueItem(UNIQUE_ITEM_TEARDROP_OF_GODNESS))
|
if (IsEquipUniqueItem(UNIQUE_ITEM_TEARDROP_OF_GODNESS))
|
||||||
iLoss /= 2;
|
iLoss /= 2;
|
||||||
|
@ -681,7 +650,7 @@ void CHARACTER::RewardGold(LPCHARACTER pkAttacker)
|
||||||
|
|
||||||
int iSplitCount;
|
int iSplitCount;
|
||||||
|
|
||||||
if (iGold >= 3 && !LC_IsYMIR())
|
if (iGold >= 3)
|
||||||
iSplitCount = Random::get(1, 3);
|
iSplitCount = Random::get(1, 3);
|
||||||
else if (GetMobRank() >= MOB_RANK_BOSS)
|
else if (GetMobRank() >= MOB_RANK_BOSS)
|
||||||
{
|
{
|
||||||
|
@ -977,11 +946,8 @@ void CHARACTER::ItemDropPenalty(LPCHARACTER pkKiller)
|
||||||
if (GetMyShop())
|
if (GetMyShop())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (false == LC_IsYMIR())
|
|
||||||
{
|
|
||||||
if (GetLevel() < 50)
|
if (GetLevel() < 50)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (CBattleArena::instance().IsBattleArenaMap(GetMapIndex()) == true)
|
if (CBattleArena::instance().IsBattleArenaMap(GetMapIndex()) == true)
|
||||||
{
|
{
|
||||||
|
@ -1321,19 +1287,16 @@ void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead)
|
||||||
{
|
{
|
||||||
int iNoPenaltyProb = 0;
|
int iNoPenaltyProb = 0;
|
||||||
|
|
||||||
if (g_iUseLocale)
|
|
||||||
{
|
|
||||||
if (pkKiller->GetAlignment() >= 0) // 1/3 percent down
|
if (pkKiller->GetAlignment() >= 0) // 1/3 percent down
|
||||||
iNoPenaltyProb = 33;
|
iNoPenaltyProb = 33;
|
||||||
else // 4/5 percent down
|
else // 4/5 percent down
|
||||||
iNoPenaltyProb = 20;
|
iNoPenaltyProb = 20;
|
||||||
}
|
|
||||||
|
|
||||||
if (Random::get(1, 100) < iNoPenaltyProb)
|
if (Random::get(1, 100) < iNoPenaltyProb)
|
||||||
pkKiller->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You did not drop any Item(s) as you are protected by the Dragon God."));
|
pkKiller->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You did not drop any Item(s) as you are protected by the Dragon God."));
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (g_iUseLocale && pkKiller->GetParty())
|
if (pkKiller->GetParty())
|
||||||
{
|
{
|
||||||
FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY());
|
FPartyAlignmentCompute f(-20000, pkKiller->GetX(), pkKiller->GetY());
|
||||||
pkKiller->GetParty()->ForEachOnlineMember(f);
|
pkKiller->GetParty()->ForEachOnlineMember(f);
|
||||||
|
@ -1348,8 +1311,6 @@ void CHARACTER::Dead(LPCHARACTER pkKiller, bool bImmediateDead)
|
||||||
pkKiller->GetParty()->ForEachOnlineMember(f);
|
pkKiller->GetParty()->ForEachOnlineMember(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
pkKiller->UpdateAlignment(-20000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2070,14 +2031,6 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu
|
||||||
int lMapIndex = GetMapIndex();
|
int lMapIndex = GetMapIndex();
|
||||||
int iMapEmpire = SECTREE_MANAGER::instance().GetEmpireFromMapIndex(lMapIndex);
|
int iMapEmpire = SECTREE_MANAGER::instance().GetEmpireFromMapIndex(lMapIndex);
|
||||||
|
|
||||||
if (LC_IsYMIR() == true)
|
|
||||||
{
|
|
||||||
if (iEmpire && iMapEmpire && iEmpire != iMapEmpire)
|
|
||||||
{
|
|
||||||
dam += (dam * 30) / 100;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pAttacker->IsPC())
|
if (pAttacker->IsPC())
|
||||||
{
|
{
|
||||||
iEmpire = pAttacker->GetEmpire();
|
iEmpire = pAttacker->GetEmpire();
|
||||||
|
@ -2091,16 +2044,10 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu
|
||||||
|
|
||||||
if (184 <= lMapIndex && lMapIndex <= 189)
|
if (184 <= lMapIndex && lMapIndex <= 189)
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR() == true)
|
|
||||||
percent = 7;
|
|
||||||
else
|
|
||||||
percent = 9;
|
percent = 9;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR() == true)
|
|
||||||
percent = 8;
|
|
||||||
else
|
|
||||||
percent = 9;
|
percent = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2177,15 +2124,6 @@ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) // retu
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------
|
|
||||||
// 독일 프리미엄 모드
|
|
||||||
// -----------------------
|
|
||||||
if (LC_IsGermany() && pAttacker && pAttacker->IsPC())
|
|
||||||
{
|
|
||||||
int iDmgPct = CHARACTER_MANAGER::instance().GetUserDamageRate(pAttacker);
|
|
||||||
dam = dam * iDmgPct / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
// STONE SKIN : 피해 반으로 감소
|
// STONE SKIN : 피해 반으로 감소
|
||||||
if (IsMonster() && IsStoneSkinner())
|
if (IsMonster() && IsStoneSkinner())
|
||||||
{
|
{
|
||||||
|
@ -2381,7 +2319,6 @@ static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 아이템 몰 판매 경험치 보너스
|
// 아이템 몰 판매 경험치 보너스
|
||||||
if (LC_IsHongKong() || LC_IsEurope() || LC_IsCanada())
|
|
||||||
{
|
{
|
||||||
// 아이템 몰: 경험치 결제
|
// 아이템 몰: 경험치 결제
|
||||||
if (to->GetPremiumRemainSeconds(PREMIUM_EXP) > 0)
|
if (to->GetPremiumRemainSeconds(PREMIUM_EXP) > 0)
|
||||||
|
@ -2397,38 +2334,6 @@ static void GiveExp(LPCHARACTER from, LPCHARACTER to, int iExp)
|
||||||
// 결혼 보너스
|
// 결혼 보너스
|
||||||
iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100;
|
iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100;
|
||||||
}
|
}
|
||||||
else if (/*LC_IsNewCIBN() || */LC_IsBrazil())
|
|
||||||
{
|
|
||||||
// 아이템 몰: 경험치 결제
|
|
||||||
if (to->GetPremiumRemainSeconds(PREMIUM_EXP) > 0)
|
|
||||||
{
|
|
||||||
iExp += iExp;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (to->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_EXP) == true)
|
|
||||||
{
|
|
||||||
iExp += iExp;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 결혼 보너스
|
|
||||||
iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 아이템 몰: 경험치 결제
|
|
||||||
if (to->GetPremiumRemainSeconds(PREMIUM_EXP) > 0)
|
|
||||||
{
|
|
||||||
iExp += (iExp * 20 / 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (to->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_EXP) == true)
|
|
||||||
{
|
|
||||||
iExp += (iExp * 20 / 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 결혼 보너스
|
|
||||||
iExp += iExp * to->GetMarriageBonus(UNIQUE_ITEM_MARRIAGE_EXP_BONUS) / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
iExp += (iExp * to->GetPoint(POINT_RAMADAN_CANDY_BONUS_EXP)/100);
|
iExp += (iExp * to->GetPoint(POINT_RAMADAN_CANDY_BONUS_EXP)/100);
|
||||||
iExp += (iExp * to->GetPoint(POINT_MALL_EXPBONUS)/100);
|
iExp += (iExp * to->GetPoint(POINT_MALL_EXPBONUS)/100);
|
||||||
|
@ -2502,11 +2407,7 @@ namespace NPartyExpDistribute
|
||||||
{
|
{
|
||||||
if (DISTANCE_APPROX(ch->GetX() - x, ch->GetY() - y) <= PARTY_DEFAULT_RANGE)
|
if (DISTANCE_APPROX(ch->GetX() - x, ch->GetY() - y) <= PARTY_DEFAULT_RANGE)
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR())
|
|
||||||
total += ch->GetLevel();
|
|
||||||
else
|
|
||||||
total += party_exp_distribute_table[ch->GetLevel()];
|
total += party_exp_distribute_table[ch->GetLevel()];
|
||||||
|
|
||||||
++member_count;
|
++member_count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2537,9 +2438,6 @@ namespace NPartyExpDistribute
|
||||||
switch (m_iMode)
|
switch (m_iMode)
|
||||||
{
|
{
|
||||||
case PARTY_EXP_DISTRIBUTION_NON_PARITY:
|
case PARTY_EXP_DISTRIBUTION_NON_PARITY:
|
||||||
if (LC_IsYMIR())
|
|
||||||
iExp2 = (DWORD) ((_iExp * ch->GetLevel()) / total);
|
|
||||||
else
|
|
||||||
iExp2 = (DWORD) (_iExp * (float) party_exp_distribute_table[ch->GetLevel()] / total);
|
iExp2 = (DWORD) (_iExp * (float) party_exp_distribute_table[ch->GetLevel()] / total);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -3293,7 +3191,7 @@ void CHARACTER::UpdateKillerMode()
|
||||||
if (!IsKillerMode())
|
if (!IsKillerMode())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int iKillerSeconds = ! LC_IsYMIR() ? 30 : 60;
|
int iKillerSeconds = 30;
|
||||||
|
|
||||||
if (thecore_pulse() - m_iKillerModePulse >= PASSES_PER_SEC(iKillerSeconds))
|
if (thecore_pulse() - m_iKillerModePulse >= PASSES_PER_SEC(iKillerSeconds))
|
||||||
SetKillerMode(false);
|
SetKillerMode(false);
|
||||||
|
|
|
@ -36,11 +36,6 @@ bool CHARACTER::StartRiding()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
{
|
|
||||||
if (CArenaManager::instance().IsArenaMap(GetMapIndex()) == true)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DWORD dwMountVnum = m_chHorse ? m_chHorse->GetRaceNum() : GetMyHorseVnum();
|
DWORD dwMountVnum = m_chHorse ? m_chHorse->GetRaceNum() : GetMyHorseVnum();
|
||||||
|
|
|
@ -148,20 +148,7 @@ bool IS_SUMMONABLE_ZONE(int map_index)
|
||||||
|
|
||||||
bool IS_BOTARYABLE_ZONE(int nMapIndex)
|
bool IS_BOTARYABLE_ZONE(int nMapIndex)
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR() == false && LC_IsKorea() == false) return true;
|
|
||||||
|
|
||||||
switch (nMapIndex)
|
|
||||||
{
|
|
||||||
case 1 :
|
|
||||||
case 3 :
|
|
||||||
case 21 :
|
|
||||||
case 23 :
|
|
||||||
case 41 :
|
|
||||||
case 43 :
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// item socket 이 프로토타입과 같은지 체크 -- by mhh
|
// item socket 이 프로토타입과 같은지 체크 -- by mhh
|
||||||
|
@ -861,26 +848,6 @@ bool CHARACTER::DoRefine(LPITEM item, bool bMoneyOnly)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check level limit in korea only
|
|
||||||
if (!g_iUseLocale)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i)
|
|
||||||
{
|
|
||||||
int limit = pProto->aLimits[i].lValue;
|
|
||||||
|
|
||||||
switch (pProto->aLimits[i].bType)
|
|
||||||
{
|
|
||||||
case LIMIT_LEVEL:
|
|
||||||
if (GetLevel() < limit)
|
|
||||||
{
|
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your level is too low to use this item."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// REFINE_COST
|
// REFINE_COST
|
||||||
if (GetGold() < cost)
|
if (GetGold() < cost)
|
||||||
{
|
{
|
||||||
|
@ -1066,26 +1033,6 @@ bool CHARACTER::DoRefineWithScroll(LPITEM item)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check level limit in korea only
|
|
||||||
if (!g_iUseLocale)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i)
|
|
||||||
{
|
|
||||||
int limit = pProto->aLimits[i].lValue;
|
|
||||||
|
|
||||||
switch (pProto->aLimits[i].bType)
|
|
||||||
{
|
|
||||||
case LIMIT_LEVEL:
|
|
||||||
if (GetLevel() < limit)
|
|
||||||
{
|
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your level is too low to use this item."));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GetGold() < prt->cost)
|
if (GetGold() < prt->cost)
|
||||||
{
|
{
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You do not have enough Yang to use this item."));
|
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You do not have enough Yang to use this item."));
|
||||||
|
@ -1126,16 +1073,10 @@ bool CHARACTER::DoRefineWithScroll(LPITEM item)
|
||||||
|
|
||||||
if (pkItemScroll->GetValue(0) == YONGSIN_SCROLL)
|
if (pkItemScroll->GetValue(0) == YONGSIN_SCROLL)
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR() == true || LC_IsKorea() == true)
|
|
||||||
success_prob = hyuniron_prob_euckr[std::clamp(item->GetRefineLevel(), 0, 8)];
|
|
||||||
else
|
|
||||||
success_prob = hyuniron_prob[std::clamp(item->GetRefineLevel(), 0, 8)];
|
success_prob = hyuniron_prob[std::clamp(item->GetRefineLevel(), 0, 8)];
|
||||||
}
|
}
|
||||||
else if (pkItemScroll->GetValue(0) == YAGONG_SCROLL)
|
else if (pkItemScroll->GetValue(0) == YAGONG_SCROLL)
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR() == true || LC_IsKorea() == true)
|
|
||||||
success_prob = yagong_prob_euckr[std::clamp(item->GetRefineLevel(), 0, 8)];
|
|
||||||
else
|
|
||||||
success_prob = yagong_prob[std::clamp(item->GetRefineLevel(), 0, 8)];
|
success_prob = yagong_prob[std::clamp(item->GetRefineLevel(), 0, 8)];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1854,21 +1795,7 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||||
switch (item->GetVnum())
|
switch (item->GetVnum())
|
||||||
{
|
{
|
||||||
case 71049: // 비단보따리
|
case 71049: // 비단보따리
|
||||||
if (LC_IsYMIR() == true || LC_IsKorea() == true)
|
|
||||||
{
|
|
||||||
if (IS_BOTARYABLE_ZONE(GetMapIndex()) == true)
|
|
||||||
{
|
|
||||||
UseSilkBotary();
|
UseSilkBotary();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't open a personal shop in this region"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UseSilkBotary();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2026,15 +1953,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||||
std::vector <LPITEM> item_gets;
|
std::vector <LPITEM> item_gets;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
if (dwBoxVnum == 50033 && LC_IsYMIR()) // 알수없는 상자
|
|
||||||
{
|
|
||||||
if (GetLevel() < 15)
|
|
||||||
{
|
|
||||||
ChatPacket(CHAT_TYPE_INFO, "Not available at level 15 and below.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if( (dwBoxVnum > 51500 && dwBoxVnum < 52000) || (dwBoxVnum >= 50255 && dwBoxVnum <= 50260) ) // 용혼원석들
|
if( (dwBoxVnum > 51500 && dwBoxVnum < 52000) || (dwBoxVnum >= 50255 && dwBoxVnum <= 50260) ) // 용혼원석들
|
||||||
{
|
{
|
||||||
if( !(this->DragonSoul_IsQualified()) )
|
if( !(this->DragonSoul_IsQualified()) )
|
||||||
|
@ -2148,10 +2066,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||||
if (distribution_test_server)
|
if (distribution_test_server)
|
||||||
iReadDelay /= 3;
|
iReadDelay /= 3;
|
||||||
|
|
||||||
//한국 본섭의 경우에는 시간을 24시간 고정
|
|
||||||
if (LC_IsKorea())
|
|
||||||
iReadDelay = 86400;
|
|
||||||
|
|
||||||
SetSkillNextReadTime(dwVnum, get_global_time() + iReadDelay);
|
SetSkillNextReadTime(dwVnum, get_global_time() + iReadDelay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2576,41 +2490,7 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||||
{ 1, 1, 11882 },
|
{ 1, 1, 11882 },
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LuckyBagInfo b2[MAX_BAG_INFO] =
|
LuckyBagInfo * bi = b1;
|
||||||
{
|
|
||||||
{ 1000, 302, 1 },
|
|
||||||
{ 10, 150, 27002 },
|
|
||||||
{ 10, 75, 27002 },
|
|
||||||
{ 10, 100, 27005 },
|
|
||||||
{ 10, 50, 27005 },
|
|
||||||
{ 10, 80, 27001 },
|
|
||||||
{ 10, 50, 27002 },
|
|
||||||
{ 10, 80, 27004 },
|
|
||||||
{ 10, 50, 27005 },
|
|
||||||
{ 1, 10, 50300 },
|
|
||||||
{ 1, 6, 92 },
|
|
||||||
{ 1, 2, 132 },
|
|
||||||
{ 1, 6, 1052 },
|
|
||||||
{ 1, 2, 1092 },
|
|
||||||
{ 1, 6, 2082 },
|
|
||||||
{ 1, 2, 2122 },
|
|
||||||
{ 1, 6, 3082 },
|
|
||||||
{ 1, 2, 3122 },
|
|
||||||
{ 1, 6, 5052 },
|
|
||||||
{ 1, 2, 5082 },
|
|
||||||
{ 1, 6, 7082 },
|
|
||||||
{ 1, 2, 7122 },
|
|
||||||
{ 1, 1, 11282 },
|
|
||||||
{ 1, 1, 11482 },
|
|
||||||
{ 1, 1, 11682 },
|
|
||||||
{ 1, 1, 11882 },
|
|
||||||
};
|
|
||||||
|
|
||||||
LuckyBagInfo * bi = NULL;
|
|
||||||
if (LC_IsHongKong())
|
|
||||||
bi = b2;
|
|
||||||
else
|
|
||||||
bi = b1;
|
|
||||||
|
|
||||||
int pct = Random::get(1, 1000);
|
int pct = Random::get(1, 1000);
|
||||||
|
|
||||||
|
@ -2970,7 +2850,7 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||||
95, 97, 99
|
95, 97, 99
|
||||||
};
|
};
|
||||||
|
|
||||||
const int * prob_table = !g_iUseLocale ? prob_table_euckr : prob_table_gb2312;
|
const int * prob_table = prob_table_gb2312;
|
||||||
|
|
||||||
if (r <= prob_table[0])
|
if (r <= prob_table[0])
|
||||||
{
|
{
|
||||||
|
@ -3012,21 +2892,7 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 50200: // 보따리
|
case 50200: // 보따리
|
||||||
if (LC_IsYMIR() == true || LC_IsKorea() == true)
|
|
||||||
{
|
|
||||||
if (IS_BOTARYABLE_ZONE(GetMapIndex()) == true)
|
|
||||||
{
|
|
||||||
__OpenPrivateShop();
|
__OpenPrivateShop();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't open a personal shop in this region"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
__OpenPrivateShop();
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case fishing::FISH_MIND_PILL_VNUM:
|
case fishing::FISH_MIND_PILL_VNUM:
|
||||||
|
@ -3803,10 +3669,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||||
|
|
||||||
case 71051 : // 진재가
|
case 71051 : // 진재가
|
||||||
{
|
{
|
||||||
// 유럽, 싱가폴, 베트남 진재가 사용금지
|
|
||||||
if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
LPITEM item2;
|
LPITEM item2;
|
||||||
|
|
||||||
if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
|
if (!IsValidItemPosition(DestCell) || !(item2 = GetInventoryItem(wDestCell)))
|
||||||
|
@ -3850,10 +3712,6 @@ bool CHARACTER::UseItemEx(LPITEM item, TItemPos DestCell)
|
||||||
|
|
||||||
case 71052 : // 진재경
|
case 71052 : // 진재경
|
||||||
{
|
{
|
||||||
// 유럽, 싱가폴, 베트남 진재가 사용금지
|
|
||||||
if (LC_IsEurope() || LC_IsSingapore() || LC_IsVietnam())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
LPITEM item2;
|
LPITEM item2;
|
||||||
|
|
||||||
if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
|
if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
|
||||||
|
@ -5355,11 +5213,6 @@ bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check non-split items for china
|
|
||||||
//if (LC_IsNewCIBN())
|
|
||||||
// if (item->GetVnum() == 71095 || item->GetVnum() == 71050 || item->GetVnum() == 70038)
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
item->SetCount(item->GetCount() - bCount);
|
item->SetCount(item->GetCount() - bCount);
|
||||||
ITEM_MANAGER::instance().FlushDelayedSave(item);
|
ITEM_MANAGER::instance().FlushDelayedSave(item);
|
||||||
|
|
||||||
|
@ -5377,11 +5230,6 @@ bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount)
|
||||||
|
|
||||||
if (pkItemToDrop->AddToGround(GetMapIndex(), pxPos))
|
if (pkItemToDrop->AddToGround(GetMapIndex(), pxPos))
|
||||||
{
|
{
|
||||||
// 한국에는 아이템을 버리고 복구해달라는 진상유저들이 많아서
|
|
||||||
// 아이템을 바닥에 버릴 시 속성로그를 남긴다.
|
|
||||||
if (LC_IsYMIR())
|
|
||||||
item->AttrLog();
|
|
||||||
|
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in 5 minutes."));
|
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in 5 minutes."));
|
||||||
pkItemToDrop->StartDestroyEvent();
|
pkItemToDrop->StartDestroyEvent();
|
||||||
|
|
||||||
|
@ -5426,33 +5274,13 @@ bool CHARACTER::DropGold(int gold)
|
||||||
//Motion(MOTION_PICKUP);
|
//Motion(MOTION_PICKUP);
|
||||||
PointChange(POINT_GOLD, -gold, true);
|
PointChange(POINT_GOLD, -gold, true);
|
||||||
|
|
||||||
// 브라질에 돈이 없어진다는 버그가 있는데,
|
|
||||||
// 가능한 시나리오 중에 하나는,
|
|
||||||
// 메크로나, 핵을 써서 1000원 이하의 돈을 계속 버려 골드를 0으로 만들고,
|
|
||||||
// 돈이 없어졌다고 복구 신청하는 것일 수도 있다.
|
|
||||||
// 따라서 그런 경우를 잡기 위해 낮은 수치의 골드에 대해서도 로그를 남김.
|
|
||||||
if (LC_IsBrazil() == true)
|
|
||||||
{
|
|
||||||
if (gold >= 213)
|
|
||||||
LogManager::instance().CharLog(this, gold, "DROP_GOLD", "");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (gold > 1000) // 천원 이상만 기록한다.
|
if (gold > 1000) // 천원 이상만 기록한다.
|
||||||
LogManager::instance().CharLog(this, gold, "DROP_GOLD", "");
|
LogManager::instance().CharLog(this, gold, "DROP_GOLD", "");
|
||||||
}
|
|
||||||
|
|
||||||
if (false == LC_IsBrazil())
|
|
||||||
{
|
|
||||||
item->StartDestroyEvent(150);
|
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in %d minutes."), 150/60);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
item->StartDestroyEvent(60);
|
item->StartDestroyEvent(60);
|
||||||
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in %d minutes."), 1);
|
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("The dropped item will vanish in %d minutes."), 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Save();
|
Save();
|
||||||
return true;
|
return true;
|
||||||
|
@ -5579,15 +5407,6 @@ bool CHARACTER::MoveItem(TItemPos Cell, TItemPos DestCell, BYTE count)
|
||||||
}
|
}
|
||||||
else if (count < item->GetCount())
|
else if (count < item->GetCount())
|
||||||
{
|
{
|
||||||
//check non-split items
|
|
||||||
//if (LC_IsNewCIBN())
|
|
||||||
//{
|
|
||||||
// if (item->GetVnum() == 71095 || item->GetVnum() == 71050 || item->GetVnum() == 70038)
|
|
||||||
// {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
SPDLOG_DEBUG("{}: ITEM_SPLIT {} (window: {}, cell : {}) -> (window:{}, cell {}) count {}", GetName(), item->GetName(), Cell.window_type, Cell.cell,
|
SPDLOG_DEBUG("{}: ITEM_SPLIT {} (window: {}, cell : {}) -> (window:{}, cell {}) count {}", GetName(), item->GetName(), Cell.window_type, Cell.cell,
|
||||||
DestCell.window_type, DestCell.cell, count);
|
DestCell.window_type, DestCell.cell, count);
|
||||||
|
|
||||||
|
@ -5707,22 +5526,9 @@ void CHARACTER::GiveGold(int iAmount)
|
||||||
{
|
{
|
||||||
PointChange(POINT_GOLD, iAmount, true);
|
PointChange(POINT_GOLD, iAmount, true);
|
||||||
|
|
||||||
// 브라질에 돈이 없어진다는 버그가 있는데,
|
|
||||||
// 가능한 시나리오 중에 하나는,
|
|
||||||
// 메크로나, 핵을 써서 1000원 이하의 돈을 계속 버려 골드를 0으로 만들고,
|
|
||||||
// 돈이 없어졌다고 복구 신청하는 것일 수도 있다.
|
|
||||||
// 따라서 그런 경우를 잡기 위해 낮은 수치의 골드에 대해서도 로그를 남김.
|
|
||||||
if (LC_IsBrazil() == true)
|
|
||||||
{
|
|
||||||
if (iAmount >= 213)
|
|
||||||
LogManager::instance().CharLog(this, iAmount, "GET_GOLD", "");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (iAmount > 1000) // 천원 이상만 기록한다.
|
if (iAmount > 1000) // 천원 이상만 기록한다.
|
||||||
LogManager::instance().CharLog(this, iAmount, "GET_GOLD", "");
|
LogManager::instance().CharLog(this, iAmount, "GET_GOLD", "");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CHARACTER::PickupItem(DWORD dwVID)
|
bool CHARACTER::PickupItem(DWORD dwVID)
|
||||||
|
@ -7150,16 +6956,7 @@ bool CHARACTER::ItemProcess_Polymorph(LPITEM item)
|
||||||
int iDuration = GetSkillLevel(POLYMORPH_SKILL_ID) == 0 ? 5 : (5 + (5 + GetSkillLevel(POLYMORPH_SKILL_ID)/40 * 25));
|
int iDuration = GetSkillLevel(POLYMORPH_SKILL_ID) == 0 ? 5 : (5 + (5 + GetSkillLevel(POLYMORPH_SKILL_ID)/40 * 25));
|
||||||
iDuration *= 60;
|
iDuration *= 60;
|
||||||
|
|
||||||
DWORD dwBonus = 0;
|
DWORD dwBonus = (2 + GetSkillLevel(POLYMORPH_SKILL_ID)/40) * 100;
|
||||||
|
|
||||||
if (true == LC_IsYMIR() || true == LC_IsKorea())
|
|
||||||
{
|
|
||||||
dwBonus = GetSkillLevel(POLYMORPH_SKILL_ID) + 60;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dwBonus = (2 + GetSkillLevel(POLYMORPH_SKILL_ID)/40) * 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
AddAffect(AFFECT_POLYMORPH, POINT_POLYMORPH, dwVnum, AFF_POLYMORPH, iDuration, 0, true);
|
AddAffect(AFFECT_POLYMORPH, POINT_POLYMORPH, dwVnum, AFF_POLYMORPH, iDuration, 0, true);
|
||||||
AddAffect(AFFECT_POLYMORPH, POINT_ATT_BONUS, dwBonus, AFF_POLYMORPH, iDuration, 0, false);
|
AddAffect(AFFECT_POLYMORPH, POINT_ATT_BONUS, dwBonus, AFF_POLYMORPH, iDuration, 0, false);
|
||||||
|
|
|
@ -923,21 +923,6 @@ LPCHARACTER CHARACTER_MANAGER::FindSpecifyPC(unsigned int uiJobFlag, int lMapInd
|
||||||
|
|
||||||
int CHARACTER_MANAGER::GetMobItemRate(LPCHARACTER ch)
|
int CHARACTER_MANAGER::GetMobItemRate(LPCHARACTER ch)
|
||||||
{
|
{
|
||||||
//PREVENT_TOXICATION_FOR_CHINA
|
|
||||||
if ( LC_IsNewCIBN() )
|
|
||||||
{
|
|
||||||
if ( ch->IsOverTime( OT_3HOUR ) )
|
|
||||||
{
|
|
||||||
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_ITEM) > 0)
|
|
||||||
return m_iMobItemRatePremium/2;
|
|
||||||
return m_iMobItemRate/2;
|
|
||||||
}
|
|
||||||
else if ( ch->IsOverTime( OT_5HOUR ) )
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//END_PREVENT_TOXICATION_FOR_CHINA
|
|
||||||
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_ITEM) > 0)
|
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_ITEM) > 0)
|
||||||
return m_iMobItemRatePremium;
|
return m_iMobItemRatePremium;
|
||||||
return m_iMobItemRate;
|
return m_iMobItemRate;
|
||||||
|
@ -953,21 +938,6 @@ int CHARACTER_MANAGER::GetMobGoldAmountRate(LPCHARACTER ch)
|
||||||
if ( !ch )
|
if ( !ch )
|
||||||
return m_iMobGoldAmountRate;
|
return m_iMobGoldAmountRate;
|
||||||
|
|
||||||
//PREVENT_TOXICATION_FOR_CHINA
|
|
||||||
if ( LC_IsNewCIBN() )
|
|
||||||
{
|
|
||||||
if ( ch->IsOverTime( OT_3HOUR ) )
|
|
||||||
{
|
|
||||||
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0)
|
|
||||||
return m_iMobGoldAmountRatePremium/2;
|
|
||||||
return m_iMobGoldAmountRate/2;
|
|
||||||
}
|
|
||||||
else if ( ch->IsOverTime( OT_5HOUR ) )
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//END_PREVENT_TOXICATION_FOR_CHINA
|
|
||||||
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0)
|
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0)
|
||||||
return m_iMobGoldAmountRatePremium;
|
return m_iMobGoldAmountRatePremium;
|
||||||
return m_iMobGoldAmountRate;
|
return m_iMobGoldAmountRate;
|
||||||
|
@ -978,22 +948,6 @@ int CHARACTER_MANAGER::GetMobGoldDropRate(LPCHARACTER ch)
|
||||||
if ( !ch )
|
if ( !ch )
|
||||||
return m_iMobGoldDropRate;
|
return m_iMobGoldDropRate;
|
||||||
|
|
||||||
//PREVENT_TOXICATION_FOR_CHINA
|
|
||||||
if ( LC_IsNewCIBN() )
|
|
||||||
{
|
|
||||||
if ( ch->IsOverTime( OT_3HOUR ) )
|
|
||||||
{
|
|
||||||
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0)
|
|
||||||
return m_iMobGoldDropRatePremium/2;
|
|
||||||
return m_iMobGoldDropRate/2;
|
|
||||||
}
|
|
||||||
else if ( ch->IsOverTime( OT_5HOUR ) )
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//END_PREVENT_TOXICATION_FOR_CHINA
|
|
||||||
|
|
||||||
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0)
|
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_GOLD) > 0)
|
||||||
return m_iMobGoldDropRatePremium;
|
return m_iMobGoldDropRatePremium;
|
||||||
return m_iMobGoldDropRate;
|
return m_iMobGoldDropRate;
|
||||||
|
@ -1004,19 +958,6 @@ int CHARACTER_MANAGER::GetMobExpRate(LPCHARACTER ch)
|
||||||
if ( !ch )
|
if ( !ch )
|
||||||
return m_iMobExpRate;
|
return m_iMobExpRate;
|
||||||
|
|
||||||
if ( LC_IsNewCIBN() )
|
|
||||||
{
|
|
||||||
if ( ch->IsOverTime( OT_3HOUR ) )
|
|
||||||
{
|
|
||||||
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_EXP) > 0)
|
|
||||||
return m_iMobExpRatePremium/2;
|
|
||||||
return m_iMobExpRate/2;
|
|
||||||
}
|
|
||||||
else if ( ch->IsOverTime( OT_5HOUR ) )
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_EXP) > 0)
|
if (ch && ch->GetPremiumRemainSeconds(PREMIUM_EXP) > 0)
|
||||||
return m_iMobExpRatePremium;
|
return m_iMobExpRatePremium;
|
||||||
return m_iMobExpRate;
|
return m_iMobExpRate;
|
||||||
|
|
|
@ -18,9 +18,6 @@ int GetPoisonDamageRate(LPCHARACTER ch)
|
||||||
|
|
||||||
if (ch->IsPC())
|
if (ch->IsPC())
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR())
|
|
||||||
iRate = 40;
|
|
||||||
else
|
|
||||||
iRate = 50;
|
iRate = 50;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -331,28 +331,6 @@ bool CHARACTER::LearnGrandMasterSkill(DWORD dwSkillVnum)
|
||||||
|
|
||||||
int iBookCount = aiGrandMasterSkillBookCountForLevelUp[idx];
|
int iBookCount = aiGrandMasterSkillBookCountForLevelUp[idx];
|
||||||
|
|
||||||
if ( LC_IsYMIR() == true || LC_IsKorea() == true )
|
|
||||||
{
|
|
||||||
const int aiGrandMasterSkillBookCountForLevelUp_euckr[10] =
|
|
||||||
{
|
|
||||||
3, 3, 4, 5, 6, 7, 8, 9, 10, 15,
|
|
||||||
};
|
|
||||||
|
|
||||||
const int aiGrandMasterSkillBookMinCount_euckr[10] =
|
|
||||||
{
|
|
||||||
1, 1, 1, 2, 2, 2, 3, 3, 4, 5
|
|
||||||
};
|
|
||||||
|
|
||||||
const int aiGrandMasterSkillBookMaxCount_euckr[10] =
|
|
||||||
{
|
|
||||||
5, 7, 9, 11, 13, 15, 18, 23, 25, 30
|
|
||||||
};
|
|
||||||
|
|
||||||
iMinReadCount = aiGrandMasterSkillBookMinCount_euckr[idx];
|
|
||||||
iMaxReadCount = aiGrandMasterSkillBookMaxCount_euckr[idx];
|
|
||||||
iBookCount = aiGrandMasterSkillBookCountForLevelUp_euckr[idx];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (FindAffect(AFFECT_SKILL_BOOK_BONUS))
|
if (FindAffect(AFFECT_SKILL_BOOK_BONUS))
|
||||||
{
|
{
|
||||||
if (iBookCount&1)
|
if (iBookCount&1)
|
||||||
|
@ -402,13 +380,7 @@ bool CHARACTER::LearnGrandMasterSkill(DWORD dwSkillVnum)
|
||||||
|
|
||||||
static bool FN_should_check_exp(LPCHARACTER ch)
|
static bool FN_should_check_exp(LPCHARACTER ch)
|
||||||
{
|
{
|
||||||
if (LC_IsCanada())
|
|
||||||
return ch->GetLevel() < gPlayerMaxLevel;
|
|
||||||
|
|
||||||
if (!LC_IsYMIR())
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -501,7 +473,6 @@ bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb)
|
||||||
|
|
||||||
SPDLOG_DEBUG("LearnSkillByBook {} table idx {} value {}", GetName(), idx, aiSkillBookCountForLevelUp[idx]);
|
SPDLOG_DEBUG("LearnSkillByBook {} table idx {} value {}", GetName(), idx, aiSkillBookCountForLevelUp[idx]);
|
||||||
|
|
||||||
if (!LC_IsYMIR())
|
|
||||||
{
|
{
|
||||||
int need_bookcount = GetSkillLevel(dwSkillVnum) - 20;
|
int need_bookcount = GetSkillLevel(dwSkillVnum) - 20;
|
||||||
|
|
||||||
|
@ -567,37 +538,6 @@ bool CHARACTER::LearnSkillByBook(DWORD dwSkillVnum, BYTE bProb)
|
||||||
// 사용자의 퀘스트 정보 로드 실패
|
// 사용자의 퀘스트 정보 로드 실패
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// INTERNATIONAL_VERSION
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int iBookCount = 99;
|
|
||||||
|
|
||||||
if (LC_IsYMIR() == true)
|
|
||||||
{
|
|
||||||
const int aiSkillBookCountForLevelUp_euckr[10] =
|
|
||||||
{
|
|
||||||
2, 2, 3, 3, 3, 3, 3, 3, 4, 5
|
|
||||||
};
|
|
||||||
|
|
||||||
iBookCount = aiSkillBookCountForLevelUp_euckr[idx];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
iBookCount = aiSkillBookCountForLevelUp[idx];
|
|
||||||
|
|
||||||
if (FindAffect(AFFECT_SKILL_BOOK_BONUS))
|
|
||||||
{
|
|
||||||
if (iBookCount & 1) // iBookCount % 2
|
|
||||||
iBookCount = iBookCount / 2 + 1;
|
|
||||||
else
|
|
||||||
iBookCount = iBookCount / 2;
|
|
||||||
|
|
||||||
RemoveAffect(AFFECT_SKILL_BOOK_BONUS);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Random::get(1, iBookCount) == 2)
|
|
||||||
SkillLevelUp(dwSkillVnum, SKILL_UP_BY_BOOK);
|
|
||||||
}
|
|
||||||
// END_OF_INTERNATIONAL_VERSION
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bLastLevel != GetSkillLevel(dwSkillVnum))
|
if (bLastLevel != GetSkillLevel(dwSkillVnum))
|
||||||
|
@ -1197,10 +1137,6 @@ struct FuncSplashDamage
|
||||||
|
|
||||||
if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER)
|
if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER)
|
||||||
{
|
{
|
||||||
//if (!g_iUseLocale)
|
|
||||||
if ( LC_IsYMIR() )
|
|
||||||
adjust += 1.0f;
|
|
||||||
else
|
|
||||||
adjust += 0.5f;
|
adjust += 0.5f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1208,15 +1144,12 @@ struct FuncSplashDamage
|
||||||
{
|
{
|
||||||
adjust = 1.0f;
|
adjust = 1.0f;
|
||||||
|
|
||||||
if ( !LC_IsYMIR() )
|
|
||||||
{
|
|
||||||
if (bUnderEunhyung)
|
if (bUnderEunhyung)
|
||||||
adjust += 0.5f;
|
adjust += 0.5f;
|
||||||
|
|
||||||
if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER)
|
if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER)
|
||||||
adjust += 0.5f;
|
adjust += 0.5f;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
iAmount = (int) (iAmount * adjust);
|
iAmount = (int) (iAmount * adjust);
|
||||||
}
|
}
|
||||||
|
@ -1226,10 +1159,6 @@ struct FuncSplashDamage
|
||||||
|
|
||||||
if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER)
|
if (m_pkChr->GetWear(WEAR_WEAPON) && m_pkChr->GetWear(WEAR_WEAPON)->GetSubType() == WEAPON_DAGGER)
|
||||||
{
|
{
|
||||||
//if (!g_iUseLocale)
|
|
||||||
if ( LC_IsYMIR() )
|
|
||||||
adjust = 1.4f;
|
|
||||||
else
|
|
||||||
adjust = 1.35f;
|
adjust = 1.35f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1480,10 +1409,6 @@ struct FuncSplashDamage
|
||||||
|
|
||||||
if (m_pkChr->IsPC() && m_pkChr->m_SkillUseInfo[m_pkSk->dwVnum].GetMainTargetVID() == (DWORD) pkChrVictim->GetVID())
|
if (m_pkChr->IsPC() && m_pkChr->m_SkillUseInfo[m_pkSk->dwVnum].GetMainTargetVID() == (DWORD) pkChrVictim->GetVID())
|
||||||
{
|
{
|
||||||
//if (!g_iUseLocale)
|
|
||||||
if (LC_IsYMIR())
|
|
||||||
SkillAttackAffect(pkChrVictim, 1000, IMMUNE_STUN, m_pkSk->dwVnum, POINT_NONE, 0, AFF_STUN, 3, m_pkSk->szName);
|
|
||||||
else
|
|
||||||
SkillAttackAffect(pkChrVictim, 1000, IMMUNE_STUN, m_pkSk->dwVnum, POINT_NONE, 0, AFF_STUN, 4, m_pkSk->szName);
|
SkillAttackAffect(pkChrVictim, 1000, IMMUNE_STUN, m_pkSk->dwVnum, POINT_NONE, 0, AFF_STUN, 4, m_pkSk->szName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2277,17 +2202,10 @@ int CHARACTER::ComputeSkill(DWORD dwVnum, LPCHARACTER pkVictim, BYTE bSkillLevel
|
||||||
DWORD affact_flag = pkSk->dwAffectFlag;
|
DWORD affact_flag = pkSk->dwAffectFlag;
|
||||||
|
|
||||||
// ADD_GRANDMASTER_SKILL
|
// ADD_GRANDMASTER_SKILL
|
||||||
//if (g_iUseLocale)
|
|
||||||
if ( !LC_IsYMIR() )
|
|
||||||
{
|
{
|
||||||
if ((pkSk->dwVnum == SKILL_CHUNKEON && GetUsedSkillMasterType(pkSk->dwVnum) < SKILL_GRAND_MASTER))
|
if ((pkSk->dwVnum == SKILL_CHUNKEON && GetUsedSkillMasterType(pkSk->dwVnum) < SKILL_GRAND_MASTER))
|
||||||
affact_flag = AFF_CHEONGEUN_WITH_FALL;
|
affact_flag = AFF_CHEONGEUN_WITH_FALL;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if ((pkSk->dwVnum == SKILL_CHUNKEON && GetUsedSkillMasterType(pkSk->dwVnum) < SKILL_MASTER))
|
|
||||||
affact_flag = AFF_CHEONGEUN_WITH_FALL;
|
|
||||||
}
|
|
||||||
// END_OF_ADD_GRANDMASTER_SKILL
|
// END_OF_ADD_GRANDMASTER_SKILL
|
||||||
|
|
||||||
pkVictim->AddAffect(pkSk->dwVnum,
|
pkVictim->AddAffect(pkSk->dwVnum,
|
||||||
|
|
|
@ -555,11 +555,7 @@ void CHARACTER::__StateIdle_NPC()
|
||||||
{
|
{
|
||||||
// 이곳입니다.
|
// 이곳입니다.
|
||||||
M2_DESTROY_CHARACTER(this);
|
M2_DESTROY_CHARACTER(this);
|
||||||
int iNextSpawnDelay = 0;
|
int iNextSpawnDelay = 50 * 60;
|
||||||
if (LC_IsYMIR())
|
|
||||||
iNextSpawnDelay = 20 * 60;
|
|
||||||
else
|
|
||||||
iNextSpawnDelay = 50 * 60;
|
|
||||||
|
|
||||||
xmas::SpawnSanta(lNextMapIndex, iNextSpawnDelay);
|
xmas::SpawnSanta(lNextMapIndex, iNextSpawnDelay);
|
||||||
}
|
}
|
||||||
|
|
|
@ -710,8 +710,6 @@ void interpret_command(LPCHARACTER ch, const char * argument, size_t len)
|
||||||
if (ch->GetGMLevel() >= GM_LOW_WIZARD)
|
if (ch->GetGMLevel() >= GM_LOW_WIZARD)
|
||||||
{
|
{
|
||||||
if (cmd_info[icmd].gm_level >= GM_LOW_WIZARD)
|
if (cmd_info[icmd].gm_level >= GM_LOW_WIZARD)
|
||||||
{
|
|
||||||
if (LC_IsEurope() == true || /*LC_IsNewCIBN() == true || */LC_IsCanada() == true || LC_IsBrazil() == true || LC_IsSingapore() == true )
|
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
snprintf( buf, sizeof(buf), "%s", argument );
|
snprintf( buf, sizeof(buf), "%s", argument );
|
||||||
|
@ -719,6 +717,5 @@ void interpret_command(LPCHARACTER ch, const char * argument, size_t len)
|
||||||
LogManager::instance().GMCommandLog(ch->GetPlayerID(), ch->GetName(), ch->GetDesc()->GetHostName(), g_bChannel, buf);
|
LogManager::instance().GMCommandLog(ch->GetPlayerID(), ch->GetName(), ch->GetDesc()->GetHostName(), g_bChannel, buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,6 @@ EVENTFUNC(timed_event)
|
||||||
{
|
{
|
||||||
ch->m_pkTimedEvent = NULL;
|
ch->m_pkTimedEvent = NULL;
|
||||||
|
|
||||||
if (true == LC_IsEurope() || true == LC_IsYMIR() || true == LC_IsKorea())
|
|
||||||
{
|
{
|
||||||
switch (info->subcmd)
|
switch (info->subcmd)
|
||||||
{
|
{
|
||||||
|
@ -903,21 +902,6 @@ ACMD(do_safebox_change_password)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsBrazil() == true)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < 6; ++i)
|
|
||||||
{
|
|
||||||
if (arg2[i] == '\0')
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (isalpha(arg2[i]) == false)
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Storeroom] The password must be alphanumeric."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TSafeboxChangePasswordPacket p;
|
TSafeboxChangePasswordPacket p;
|
||||||
|
|
||||||
p.dwID = ch->GetDesc()->GetAccountTable().id;
|
p.dwID = ch->GetDesc()->GetAccountTable().id;
|
||||||
|
@ -1443,9 +1427,6 @@ ACMD(do_party_request_deny)
|
||||||
|
|
||||||
ACMD(do_monarch_warpto)
|
ACMD(do_monarch_warpto)
|
||||||
{
|
{
|
||||||
if (true == LC_IsYMIR() || true == LC_IsKorea())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!CMonarch::instance().IsMonarch(ch->GetPlayerID(), ch->GetEmpire()))
|
if (!CMonarch::instance().IsMonarch(ch->GetPlayerID(), ch->GetEmpire()))
|
||||||
{
|
{
|
||||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This function can only be used by the emperor."));
|
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This function can only be used by the emperor."));
|
||||||
|
@ -1559,9 +1540,6 @@ ACMD(do_monarch_warpto)
|
||||||
|
|
||||||
ACMD(do_monarch_transfer)
|
ACMD(do_monarch_transfer)
|
||||||
{
|
{
|
||||||
if (true == LC_IsYMIR() || true == LC_IsKorea())
|
|
||||||
return;
|
|
||||||
|
|
||||||
char arg1[256];
|
char arg1[256];
|
||||||
one_argument(argument, arg1, sizeof(arg1));
|
one_argument(argument, arg1, sizeof(arg1));
|
||||||
|
|
||||||
|
@ -1845,15 +1823,6 @@ ACMD(do_monarch_mob)
|
||||||
BYTE pcEmpire = ch->GetEmpire();
|
BYTE pcEmpire = ch->GetEmpire();
|
||||||
BYTE mapEmpire = SECTREE_MANAGER::instance().GetEmpireFromMapIndex(ch->GetMapIndex());
|
BYTE mapEmpire = SECTREE_MANAGER::instance().GetEmpireFromMapIndex(ch->GetMapIndex());
|
||||||
|
|
||||||
if (LC_IsYMIR() == true || LC_IsKorea() == true)
|
|
||||||
{
|
|
||||||
if (mapEmpire != pcEmpire && mapEmpire != 0)
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("This feature is only available in your home territory"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 군주 몹 소환 비용
|
// 군주 몹 소환 비용
|
||||||
const int SummonPrice = 5000000;
|
const int SummonPrice = 5000000;
|
||||||
|
|
||||||
|
@ -2264,84 +2233,9 @@ ACMD(do_cube)
|
||||||
|
|
||||||
ACMD(do_in_game_mall)
|
ACMD(do_in_game_mall)
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR() == true || LC_IsKorea() == true)
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://metin2.co.kr/04_mall/mall/login.htm");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (true == LC_IsTaiwan())
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://203.69.141.203/mall/mall/item_main.htm");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ㅠ_ㅠ 쾌도서버 아이템몰 URL 하드코딩 추가
|
|
||||||
if (true == LC_IsWE_Korea())
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://metin2.co.kr/50_we_mall/mall/login.htm");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LC_IsJapan() == true)
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://mt2.oge.jp/itemmall/itemList.php");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LC_IsNewCIBN() == true && test_server)
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://218.99.6.51/04_mall/mall/login.htm");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LC_IsSingapore() == true)
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://www.metin2.sg/ishop.php");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_COMMAND, "mall http://mall.z8games.com/mall_entry.aspx?tb=m2");
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if (LC_IsEurope() == true)
|
|
||||||
{
|
{
|
||||||
char country_code[3];
|
char country_code[3];
|
||||||
|
|
||||||
switch (LC_GetLocalType())
|
|
||||||
{
|
|
||||||
case LC_GERMANY: country_code[0] = 'd'; country_code[1] = 'e'; country_code[2] = '\0'; break;
|
|
||||||
case LC_FRANCE: country_code[0] = 'f'; country_code[1] = 'r'; country_code[2] = '\0'; break;
|
|
||||||
case LC_ITALY: country_code[0] = 'i'; country_code[1] = 't'; country_code[2] = '\0'; break;
|
|
||||||
case LC_SPAIN: country_code[0] = 'e'; country_code[1] = 's'; country_code[2] = '\0'; break;
|
|
||||||
case LC_UK: country_code[0] = 'e'; country_code[1] = 'n'; country_code[2] = '\0'; break;
|
|
||||||
case LC_TURKEY: country_code[0] = 't'; country_code[1] = 'r'; country_code[2] = '\0'; break;
|
|
||||||
case LC_POLAND: country_code[0] = 'p'; country_code[1] = 'l'; country_code[2] = '\0'; break;
|
|
||||||
case LC_PORTUGAL: country_code[0] = 'p'; country_code[1] = 't'; country_code[2] = '\0'; break;
|
|
||||||
case LC_GREEK: country_code[0] = 'g'; country_code[1] = 'r'; country_code[2] = '\0'; break;
|
|
||||||
case LC_RUSSIA: country_code[0] = 'r'; country_code[1] = 'u'; country_code[2] = '\0'; break;
|
|
||||||
case LC_DENMARK: country_code[0] = 'd'; country_code[1] = 'k'; country_code[2] = '\0'; break;
|
|
||||||
case LC_BULGARIA: country_code[0] = 'b'; country_code[1] = 'g'; country_code[2] = '\0'; break;
|
|
||||||
case LC_CROATIA: country_code[0] = 'h'; country_code[1] = 'r'; country_code[2] = '\0'; break;
|
|
||||||
case LC_MEXICO: country_code[0] = 'm'; country_code[1] = 'x'; country_code[2] = '\0'; break;
|
|
||||||
case LC_ARABIA: country_code[0] = 'a'; country_code[1] = 'e'; country_code[2] = '\0'; break;
|
|
||||||
case LC_CZECH: country_code[0] = 'c'; country_code[1] = 'z'; country_code[2] = '\0'; break;
|
|
||||||
case LC_ROMANIA: country_code[0] = 'r'; country_code[1] = 'o'; country_code[2] = '\0'; break;
|
|
||||||
case LC_HUNGARY: country_code[0] = 'h'; country_code[1] = 'u'; country_code[2] = '\0'; break;
|
|
||||||
case LC_NETHERLANDS: country_code[0] = 'n'; country_code[1] = 'l'; country_code[2] = '\0'; break;
|
|
||||||
case LC_USA: country_code[0] = 'u'; country_code[1] = 's'; country_code[2] = '\0'; break;
|
|
||||||
case LC_CANADA: country_code[0] = 'c'; country_code[1] = 'a'; country_code[2] = '\0'; break;
|
|
||||||
default:
|
|
||||||
if (test_server == true)
|
|
||||||
{
|
|
||||||
country_code[0] = 'd'; country_code[1] = 'e'; country_code[2] = '\0';
|
country_code[0] = 'd'; country_code[1] = 'e'; country_code[2] = '\0';
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
char buf[512+1];
|
char buf[512+1];
|
||||||
|
|
||||||
|
|
|
@ -3267,17 +3267,8 @@ ACMD(do_duel)
|
||||||
if (set > 5) set = 5;
|
if (set > 5) set = 5;
|
||||||
|
|
||||||
if (!str_to_number(minute, szMinute))
|
if (!str_to_number(minute, szMinute))
|
||||||
{
|
|
||||||
// 캐나다는 기본 10분.
|
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
{
|
|
||||||
minute = 10;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
minute = 5;
|
minute = 5;
|
||||||
}
|
|
||||||
}
|
|
||||||
if (minute < 5)
|
if (minute < 5)
|
||||||
minute = 5;
|
minute = 5;
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,6 @@ WORD p2p_port = 50900;
|
||||||
|
|
||||||
char db_addr[ADDRESS_MAX_LEN + 1];
|
char db_addr[ADDRESS_MAX_LEN + 1];
|
||||||
WORD db_port = 0;
|
WORD db_port = 0;
|
||||||
|
|
||||||
char teen_addr[ADDRESS_MAX_LEN + 1] = {0};
|
|
||||||
WORD teen_port = 0;
|
|
||||||
// End of networking
|
// End of networking
|
||||||
|
|
||||||
BYTE g_bChannel = 0;
|
BYTE g_bChannel = 0;
|
||||||
|
@ -933,24 +930,6 @@ void config_init(const string& st_localeServiceName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TOKEN("teen_addr")
|
|
||||||
{
|
|
||||||
strlcpy(teen_addr, value_string, sizeof(teen_addr));
|
|
||||||
|
|
||||||
for (int n =0; n < ADDRESS_MAX_LEN; ++n)
|
|
||||||
{
|
|
||||||
if (teen_addr[n] == ' ')
|
|
||||||
teen_addr[n] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
TOKEN("teen_port")
|
|
||||||
{
|
|
||||||
str_to_number(teen_port, value_string);
|
|
||||||
}
|
|
||||||
|
|
||||||
TOKEN("synchack_limit_count")
|
TOKEN("synchack_limit_count")
|
||||||
{
|
{
|
||||||
str_to_number(g_iSyncHackLimitCount, value_string);
|
str_to_number(g_iSyncHackLimitCount, value_string);
|
||||||
|
@ -1179,14 +1158,7 @@ bool LoadClientVersion()
|
||||||
|
|
||||||
void CheckClientVersion()
|
void CheckClientVersion()
|
||||||
{
|
{
|
||||||
if (LC_IsEurope())
|
|
||||||
{
|
|
||||||
g_bCheckClientVersion = true;
|
g_bCheckClientVersion = true;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_bCheckClientVersion = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const DESC_MANAGER::DESC_SET & set = DESC_MANAGER::instance().GetClientSet();
|
const DESC_MANAGER::DESC_SET & set = DESC_MANAGER::instance().GetClientSet();
|
||||||
DESC_MANAGER::DESC_SET::const_iterator it = set.begin();
|
DESC_MANAGER::DESC_SET::const_iterator it = set.begin();
|
||||||
|
@ -1218,7 +1190,6 @@ void LoadStateUserCount()
|
||||||
if (!fp)
|
if (!fp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!LC_IsHongKong())
|
|
||||||
fscanf(fp, " %d %d ", &g_iFullUserCount, &g_iBusyUserCount);
|
fscanf(fp, " %d %d ", &g_iFullUserCount, &g_iBusyUserCount);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
|
@ -20,9 +20,6 @@ extern WORD p2p_port;
|
||||||
extern char db_addr[ADDRESS_MAX_LEN + 1];
|
extern char db_addr[ADDRESS_MAX_LEN + 1];
|
||||||
extern WORD db_port;
|
extern WORD db_port;
|
||||||
|
|
||||||
extern char teen_addr[ADDRESS_MAX_LEN + 1];
|
|
||||||
extern WORD teen_port;
|
|
||||||
|
|
||||||
extern int passes_per_sec;
|
extern int passes_per_sec;
|
||||||
extern int save_event_second_cycle;
|
extern int save_event_second_cycle;
|
||||||
extern int ping_event_second_cycle;
|
extern int ping_event_second_cycle;
|
||||||
|
|
|
@ -355,17 +355,6 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg)
|
||||||
|
|
||||||
char szCreateDate[256] = "00000000";
|
char szCreateDate[256] = "00000000";
|
||||||
|
|
||||||
if (!g_iUseLocale)
|
|
||||||
{
|
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_EXP], row[col++]);
|
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_ITEM], row[col++]);
|
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_SAFEBOX], row[col++]);
|
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_AUTOLOOT], row[col++]);
|
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_FISH_MIND], row[col++]);
|
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_MARRIAGE_FAST], row[col++]);
|
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_GOLD], row[col++]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_EXP], row[col++]);
|
str_to_number(aiPremiumTimes[PREMIUM_EXP], row[col++]);
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_ITEM], row[col++]);
|
str_to_number(aiPremiumTimes[PREMIUM_ITEM], row[col++]);
|
||||||
|
@ -375,8 +364,6 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg)
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_MARRIAGE_FAST], row[col++]);
|
str_to_number(aiPremiumTimes[PREMIUM_MARRIAGE_FAST], row[col++]);
|
||||||
str_to_number(aiPremiumTimes[PREMIUM_GOLD], row[col++]);
|
str_to_number(aiPremiumTimes[PREMIUM_GOLD], row[col++]);
|
||||||
|
|
||||||
if (LC_IsEurope() || test_server)
|
|
||||||
{
|
|
||||||
int retValue = 0;
|
int retValue = 0;
|
||||||
str_to_number(retValue, row[col]);
|
str_to_number(retValue, row[col]);
|
||||||
|
|
||||||
|
@ -388,15 +375,9 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg)
|
||||||
SPDLOG_DEBUG("Create_Time {} {}", retValue, szCreateDate);
|
SPDLOG_DEBUG("Create_Time {} {}", retValue, szCreateDate);
|
||||||
SPDLOG_DEBUG("Block Time {} ", strncmp(szCreateDate, g_stBlockDate.c_str(), 8));
|
SPDLOG_DEBUG("Block Time {} ", strncmp(szCreateDate, g_stBlockDate.c_str(), 8));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
int nPasswordDiff = strcmp(szEncrytPassword, szPassword);
|
int nPasswordDiff = strcmp(szEncrytPassword, szPassword);
|
||||||
|
|
||||||
if (true == LC_IsBrazil())
|
|
||||||
{
|
|
||||||
nPasswordDiff = 0; // 브라질 버전에서는 비밀번호 체크를 하지 않는다.
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nPasswordDiff)
|
if (nPasswordDiff)
|
||||||
{
|
{
|
||||||
LoginFailure(d, "WRONGPWD");
|
LoginFailure(d, "WRONGPWD");
|
||||||
|
@ -422,8 +403,6 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg)
|
||||||
M2_DELETE(pinfo);
|
M2_DELETE(pinfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
if (LC_IsEurope())
|
|
||||||
{
|
{
|
||||||
//stBlockData >= 0 == 날짜가 BlockDate 보다 미래
|
//stBlockData >= 0 == 날짜가 BlockDate 보다 미래
|
||||||
if (strncmp(szCreateDate, g_stBlockDate.c_str(), 8) >= 0)
|
if (strncmp(szCreateDate, g_stBlockDate.c_str(), 8) >= 0)
|
||||||
|
@ -437,7 +416,7 @@ void DBManager::AnalyzeReturnQuery(SQLMsg * pMsg)
|
||||||
char szQuery[1024];
|
char szQuery[1024];
|
||||||
snprintf(szQuery, sizeof(szQuery), "UPDATE account SET last_play=NOW() WHERE id=%u", dwID);
|
snprintf(szQuery, sizeof(szQuery), "UPDATE account SET last_play=NOW() WHERE id=%u", dwID);
|
||||||
std::unique_ptr<SQLMsg> msg( DBManager::instance().DirectQuery(szQuery) );
|
std::unique_ptr<SQLMsg> msg( DBManager::instance().DirectQuery(szQuery) );
|
||||||
}
|
|
||||||
|
|
||||||
TAccountTable & r = d->GetAccountTable();
|
TAccountTable & r = d->GetAccountTable();
|
||||||
|
|
||||||
|
|
|
@ -48,11 +48,6 @@ void DescWriteHandler(bufferevent *bev, void *ctx) {
|
||||||
evbuffer *output = bufferevent_get_output(bev);
|
evbuffer *output = bufferevent_get_output(bev);
|
||||||
size_t buf_size = evbuffer_get_length(output);
|
size_t buf_size = evbuffer_get_length(output);
|
||||||
}
|
}
|
||||||
else if (g_TeenDesc==d)
|
|
||||||
{
|
|
||||||
evbuffer *output = bufferevent_get_output(bev);
|
|
||||||
size_t buf_size = evbuffer_get_length(output);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DescEventHandler(bufferevent *bev, short events, void *ctx) {
|
void DescEventHandler(bufferevent *bev, short events, void *ctx) {
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
LPCLIENT_DESC db_clientdesc = NULL;
|
LPCLIENT_DESC db_clientdesc = NULL;
|
||||||
LPCLIENT_DESC g_pkAuthMasterDesc = NULL;
|
LPCLIENT_DESC g_pkAuthMasterDesc = NULL;
|
||||||
LPCLIENT_DESC g_NetmarbleDBDesc = NULL;
|
LPCLIENT_DESC g_NetmarbleDBDesc = NULL;
|
||||||
LPCLIENT_DESC g_TeenDesc = NULL;
|
|
||||||
|
|
||||||
static const char* GetKnownClientDescName(LPCLIENT_DESC desc) {
|
static const char* GetKnownClientDescName(LPCLIENT_DESC desc) {
|
||||||
if (desc == db_clientdesc) {
|
if (desc == db_clientdesc) {
|
||||||
|
@ -23,8 +22,6 @@ static const char* GetKnownClientDescName(LPCLIENT_DESC desc) {
|
||||||
return "g_pkAuthMasterDesc";
|
return "g_pkAuthMasterDesc";
|
||||||
} else if (desc == g_NetmarbleDBDesc) {
|
} else if (desc == g_NetmarbleDBDesc) {
|
||||||
return "g_NetmarbleDBDesc";
|
return "g_NetmarbleDBDesc";
|
||||||
} else if (desc == g_TeenDesc) {
|
|
||||||
return "g_TeenDesc";
|
|
||||||
}
|
}
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
@ -243,11 +240,6 @@ void CLIENT_DESC::SetPhase(int iPhase)
|
||||||
m_pInputProcessor = NULL;
|
m_pInputProcessor = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PHASE_TEEN:
|
|
||||||
m_inputTeen.SetStep(0);
|
|
||||||
m_pInputProcessor = &m_inputTeen;
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_iPhase = iPhase;
|
m_iPhase = iPhase;
|
||||||
|
|
|
@ -42,13 +42,11 @@ class CLIENT_DESC : public DESC
|
||||||
|
|
||||||
CInputDB m_inputDB;
|
CInputDB m_inputDB;
|
||||||
CInputP2P m_inputP2P;
|
CInputP2P m_inputP2P;
|
||||||
CInputTeen m_inputTeen;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern LPCLIENT_DESC db_clientdesc;
|
extern LPCLIENT_DESC db_clientdesc;
|
||||||
extern LPCLIENT_DESC g_pkAuthMasterDesc;
|
extern LPCLIENT_DESC g_pkAuthMasterDesc;
|
||||||
extern LPCLIENT_DESC g_NetmarbleDBDesc;
|
extern LPCLIENT_DESC g_NetmarbleDBDesc;
|
||||||
extern LPCLIENT_DESC g_TeenDesc;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -53,36 +53,11 @@ void ConvertEmpireText(DWORD dwEmpireID, char* szText, size_t len, int iPct)
|
||||||
if (Random::get(1,100) > iPct)
|
if (Random::get(1,100) > iPct)
|
||||||
{
|
{
|
||||||
if (*pbText & 0x80)
|
if (*pbText & 0x80)
|
||||||
{
|
|
||||||
if (g_iUseLocale)
|
|
||||||
{
|
{
|
||||||
static char s_cChinaTable[][3] = {"\xA1\xF2","\xA3\xA3","\xA3\xA4","\xA1\xF9","\xA1\xF0" };
|
static char s_cChinaTable[][3] = {"\xA1\xF2","\xA3\xA3","\xA3\xA4","\xA1\xF9","\xA1\xF0" };
|
||||||
int n = Random::get(0, 4);
|
int n = Random::get(0, 4);
|
||||||
pbText[0] = s_cChinaTable[n][0];
|
pbText[0] = s_cChinaTable[n][0];
|
||||||
pbText[1] = s_cChinaTable[n][1];
|
pbText[1] = s_cChinaTable[n][1];
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (pbText[0] >= 0xB0 && pbText[0] <= 0xC8 && pbText[1] >= 0xA1 && pbText[1] <= 0xFE)
|
|
||||||
{
|
|
||||||
UINT uHanPos = (pbText[0] - 0xB0) * (0xFE - 0xA1 + 1) + (pbText[1] - 0xA1);
|
|
||||||
pbText[0] = rkTextConvTable.aacHan[uHanPos][0];
|
|
||||||
pbText[1] = rkTextConvTable.aacHan[uHanPos][1];
|
|
||||||
}
|
|
||||||
else if ( pbText[0] == 0xA4 )
|
|
||||||
{
|
|
||||||
if ( pbText[1] >=0xA1 && pbText[1] <= 0xBE )
|
|
||||||
{
|
|
||||||
pbText[0] = rkTextConvTable.aacJaum[pbText[1]-0xA1][0];
|
|
||||||
pbText[1] = rkTextConvTable.aacJaum[pbText[1]-0xA1][1];
|
|
||||||
}
|
|
||||||
else if ( pbText[1] >= 0xBF && pbText[1] <= 0xD3 )
|
|
||||||
{
|
|
||||||
pbText[0] = rkTextConvTable.aacMoum[pbText[1]-0xBF][0];
|
|
||||||
pbText[1] = rkTextConvTable.aacMoum[pbText[1]-0xBF][1];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
++pbText;
|
++pbText;
|
||||||
--len;
|
--len;
|
||||||
|
|
|
@ -253,13 +253,11 @@ bool CExchange::AddGold(int gold)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( LC_IsCanada() == true || LC_IsEurope() == true )
|
|
||||||
{
|
|
||||||
if ( m_lGold > 0 )
|
if ( m_lGold > 0 )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Accept(false);
|
Accept(false);
|
||||||
GetCompany()->Accept(false);
|
GetCompany()->Accept(false);
|
||||||
|
|
|
@ -387,21 +387,6 @@ int DetermineFish(LPCHARACTER ch)
|
||||||
int * p = std::lower_bound(g_prob_accumulate[prob_idx], g_prob_accumulate[prob_idx] + MAX_FISH, rv);
|
int * p = std::lower_bound(g_prob_accumulate[prob_idx], g_prob_accumulate[prob_idx] + MAX_FISH, rv);
|
||||||
int fish_idx = p - g_prob_accumulate[prob_idx];
|
int fish_idx = p - g_prob_accumulate[prob_idx];
|
||||||
|
|
||||||
//if (!g_iUseLocale)
|
|
||||||
if ( LC_IsYMIR() )
|
|
||||||
{
|
|
||||||
if (fish_info[fish_idx].vnum >= 70040 && fish_info[fish_idx].vnum <= 70052)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_iUseLocale) // 중국에서는 금덩어리, 금열쇠, 은열쇠 나오지 않게 함
|
|
||||||
{
|
|
||||||
DWORD vnum = fish_info[fish_idx].vnum;
|
|
||||||
|
|
||||||
if (vnum == 50008 || vnum == 50009 || vnum == 80008)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (fish_idx);
|
return (fish_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -772,11 +757,6 @@ void UseFish(LPCHARACTER ch, LPITEM item)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case USED_SHELLFISH: // 1
|
case USED_SHELLFISH: // 1
|
||||||
if ( LC_IsCanada() == true )
|
|
||||||
{
|
|
||||||
if ( Random::get(0, 2) != 2 ) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("There is a Clam inside the Fish."));
|
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("There is a Clam inside the Fish."));
|
||||||
ch->AutoGiveItem(SHELLFISH_VNUM);
|
ch->AutoGiveItem(SHELLFISH_VNUM);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -64,10 +64,6 @@ BYTE gm_new_get_level( const char * name, const char * host, const char* account
|
||||||
if (g_map_GM.end() == it)
|
if (g_map_GM.end() == it)
|
||||||
return GM_PLAYER;
|
return GM_PLAYER;
|
||||||
|
|
||||||
// GERMAN_GM_NOT_CHECK_HOST
|
|
||||||
// 독일 버전은 호스트 체크를 하지 않는다.
|
|
||||||
if ( LC_IsEurope() && !LC_IsTaiwan() || LC_IsSingapore() )
|
|
||||||
{
|
|
||||||
if (account)
|
if (account)
|
||||||
{
|
{
|
||||||
if ( strcmp ( it->second.Info.m_szAccount, account ) != 0 )
|
if ( strcmp ( it->second.Info.m_szAccount, account ) != 0 )
|
||||||
|
@ -78,35 +74,6 @@ BYTE gm_new_get_level( const char * name, const char * host, const char* account
|
||||||
}
|
}
|
||||||
SPDLOG_DEBUG("GM_NEW_GET_LEVEL : FIND ACCOUNT");
|
SPDLOG_DEBUG("GM_NEW_GET_LEVEL : FIND ACCOUNT");
|
||||||
return it->second.Info.m_Authority;
|
return it->second.Info.m_Authority;
|
||||||
}
|
|
||||||
// END_OF_GERMAN_GM_NOT_CHECK_HOST
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
if ( host )
|
|
||||||
{
|
|
||||||
if ( it->second.pset_Host )
|
|
||||||
{
|
|
||||||
if ( it->second.pset_Host->end() == it->second.pset_Host->find( host ) )
|
|
||||||
{
|
|
||||||
SPDLOG_DEBUG("GM_NEW_GET_LEVEL : BAD HOST IN HOST_LIST");
|
|
||||||
return GM_PLAYER;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( strcmp ( it->second.Info.m_szContactIP, host ) != 0 )
|
|
||||||
{
|
|
||||||
SPDLOG_DEBUG("GM_NEW_GET_LEVEL : BAD HOST IN GMLIST");
|
|
||||||
return GM_PLAYER;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SPDLOG_DEBUG("GM_NEW_GET_LEVEL : FIND HOST");
|
|
||||||
|
|
||||||
return it->second.Info.m_Authority;
|
|
||||||
}
|
|
||||||
return GM_PLAYER;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//END_ADMIN_MANAGER
|
//END_ADMIN_MANAGER
|
||||||
|
|
|
@ -228,11 +228,6 @@ bool CGuild::RemoveMember(DWORD pid)
|
||||||
ch->SetGuild(NULL);
|
ch->SetGuild(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( LC_IsBrazil() == true )
|
|
||||||
{
|
|
||||||
DBManager::instance().Query("REPLACE INTO guild_invite_limit VALUES(%d, %d)", GetID(), get_global_time());
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1470,14 +1465,7 @@ void CGuild::UpdateSkill(BYTE skill_point, BYTE* skill_levels)
|
||||||
|
|
||||||
static DWORD __guild_levelup_exp(int level)
|
static DWORD __guild_levelup_exp(int level)
|
||||||
{
|
{
|
||||||
if (LC_IsYMIR())
|
|
||||||
{
|
|
||||||
return guild_exp_table[level];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return guild_exp_table2[level];
|
return guild_exp_table2[level];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuild::GuildPointChange(BYTE type, int amount, bool save)
|
void CGuild::GuildPointChange(BYTE type, int amount, bool save)
|
||||||
|
@ -1776,19 +1764,6 @@ int CGuild::GetMaxMemberCount()
|
||||||
m_iMemberCountBonus = 0;
|
m_iMemberCountBonus = 0;
|
||||||
// END_GUILD_IS_FULL_BUG_FIX
|
// END_GUILD_IS_FULL_BUG_FIX
|
||||||
|
|
||||||
if ( LC_IsHongKong() == true )
|
|
||||||
{
|
|
||||||
quest::PC* pPC = quest::CQuestManager::instance().GetPC(GetMasterPID());
|
|
||||||
|
|
||||||
if ( pPC != NULL )
|
|
||||||
{
|
|
||||||
if ( pPC->GetFlag("guild.is_unlimit_member") == 1 )
|
|
||||||
{
|
|
||||||
return INT_MAX;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 32 + 2 * (m_data.level-1) + m_iMemberCountBonus;
|
return 32 + 2 * (m_data.level-1) + m_iMemberCountBonus;
|
||||||
}
|
}
|
||||||
// END_OF_GUILD_MEMBER_COUNT_BONUS
|
// END_OF_GUILD_MEMBER_COUNT_BONUS
|
||||||
|
@ -2086,28 +2061,6 @@ CGuild::GuildJoinErrCode CGuild::VerifyGuildJoinableCondition( const LPCHARACTER
|
||||||
{
|
{
|
||||||
return GERR_GUILD_IS_IN_WAR;
|
return GERR_GUILD_IS_IN_WAR;
|
||||||
}
|
}
|
||||||
else if ( LC_IsBrazil() == true )
|
|
||||||
{
|
|
||||||
std::unique_ptr<SQLMsg> pMsg( DBManager::instance().DirectQuery("SELECT value FROM guild_invite_limit WHERE id=%d", GetID()) );
|
|
||||||
|
|
||||||
if ( pMsg->Get()->uiNumRows > 0 )
|
|
||||||
{
|
|
||||||
MYSQL_ROW row = mysql_fetch_row(pMsg->Get()->pSQLResult);
|
|
||||||
time_t limit_time=0;
|
|
||||||
str_to_number( limit_time, row[0] );
|
|
||||||
|
|
||||||
if ( test_server == true )
|
|
||||||
{
|
|
||||||
limit_time += quest::CQuestManager::instance().GetEventFlag("guild_invite_limit") * 60;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
limit_time += quest::CQuestManager::instance().GetEventFlag("guild_invite_limit") * 24 * 60 * 60;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( get_global_time() < limit_time ) return GERR_INVITE_LIMIT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return GERR_NONE;
|
return GERR_NONE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -537,14 +537,11 @@ void CGuildManager::DeclareWar(DWORD guild_id1, DWORD guild_id2, BYTE bType)
|
||||||
|
|
||||||
if (g1->DeclareWar(guild_id2, bType, GUILD_WAR_SEND_DECLARE) &&
|
if (g1->DeclareWar(guild_id2, bType, GUILD_WAR_SEND_DECLARE) &&
|
||||||
g2->DeclareWar(guild_id1, bType, GUILD_WAR_RECV_DECLARE))
|
g2->DeclareWar(guild_id1, bType, GUILD_WAR_RECV_DECLARE))
|
||||||
{
|
|
||||||
if (false == LC_IsGermany())
|
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[256];
|
||||||
snprintf(buf, sizeof(buf), LC_TEXT("The guild %s has declared war on %s!"), TouchGuild(guild_id1)->GetName(), TouchGuild(guild_id2)->GetName());
|
snprintf(buf, sizeof(buf), LC_TEXT("The guild %s has declared war on %s!"), TouchGuild(guild_id1)->GetName(), TouchGuild(guild_id2)->GetName());
|
||||||
SendNotice(buf);
|
SendNotice(buf);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGuildManager::RefuseWar(DWORD guild_id1, DWORD guild_id2)
|
void CGuildManager::RefuseWar(DWORD guild_id1, DWORD guild_id2)
|
||||||
|
|
|
@ -13,7 +13,6 @@ enum
|
||||||
INPROC_DB,
|
INPROC_DB,
|
||||||
INPROC_P2P,
|
INPROC_P2P,
|
||||||
INPROC_AUTH,
|
INPROC_AUTH,
|
||||||
INPROC_TEEN,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void LoginFailure(LPDESC d, const char * c_pszStatus);
|
void LoginFailure(LPDESC d, const char * c_pszStatus);
|
||||||
|
@ -335,23 +334,5 @@ class CInputAuth : public CInputProcessor
|
||||||
void Login(LPDESC d, const char * c_pData);
|
void Login(LPDESC d, const char * c_pData);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CInputTeen : public CInputProcessor
|
|
||||||
{
|
|
||||||
public :
|
|
||||||
virtual BYTE GetType() { return INPROC_TEEN; }
|
|
||||||
|
|
||||||
void SetStep(int step);
|
|
||||||
|
|
||||||
protected :
|
|
||||||
virtual bool Process(LPDESC lpDesc, const void * c_pvOrig, int iBytes, int & r_iBytesProceed);
|
|
||||||
virtual int Analyze(LPDESC d, BYTE bHeader, const char * c_pData) { return 0; };
|
|
||||||
|
|
||||||
private:
|
|
||||||
int m_step;
|
|
||||||
|
|
||||||
bool ProcessHandshake(LPDESC lpDesc, const void * c_pvOrig, size_t uiBytes, int & r_iBytesProceed);
|
|
||||||
bool ProcessMain(LPDESC lpDesc, const void * c_pvOrig, size_t uiBytes, int & r_iBytesProceed);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __INC_METIN_II_GAME_INPUT_PROCESSOR__ */
|
#endif /* __INC_METIN_II_GAME_INPUT_PROCESSOR__ */
|
||||||
|
|
||||||
|
|
|
@ -27,62 +27,6 @@ bool FN_IS_VALID_LOGIN_STRING(const char *str)
|
||||||
if (isdigit(*tmp) || isalpha(*tmp))
|
if (isdigit(*tmp) || isalpha(*tmp))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// 캐나다는 몇몇 특수문자 허용
|
|
||||||
if (LC_IsCanada())
|
|
||||||
{
|
|
||||||
switch (*tmp)
|
|
||||||
{
|
|
||||||
case ' ':
|
|
||||||
case '_':
|
|
||||||
case '-':
|
|
||||||
case '.':
|
|
||||||
case '!':
|
|
||||||
case '@':
|
|
||||||
case '#':
|
|
||||||
case '$':
|
|
||||||
case '%':
|
|
||||||
case '^':
|
|
||||||
case '&':
|
|
||||||
case '*':
|
|
||||||
case '(':
|
|
||||||
case ')':
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LC_IsYMIR() == true || LC_IsKorea() == true)
|
|
||||||
{
|
|
||||||
switch (*tmp)
|
|
||||||
{
|
|
||||||
case '-' :
|
|
||||||
case '_' :
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LC_IsBrazil() == true)
|
|
||||||
{
|
|
||||||
switch (*tmp)
|
|
||||||
{
|
|
||||||
case '_' :
|
|
||||||
case '-' :
|
|
||||||
case '=' :
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LC_IsJapan() == true)
|
|
||||||
{
|
|
||||||
switch (*tmp)
|
|
||||||
{
|
|
||||||
case '-' :
|
|
||||||
case '_' :
|
|
||||||
case '@':
|
|
||||||
case '#':
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -414,12 +414,6 @@ void CInputDB::PlayerLoad(LPDESC d, const char * data)
|
||||||
snprintf(buf, sizeof(buf), "%s %d %d %d %d",
|
snprintf(buf, sizeof(buf), "%s %d %d %d %d",
|
||||||
ch->GetDesc()->GetHostName(), ch->GetGold(), g_bChannel, ch->GetMapIndex(), ch->GetAlignment());
|
ch->GetDesc()->GetHostName(), ch->GetGold(), g_bChannel, ch->GetMapIndex(), ch->GetAlignment());
|
||||||
LogManager::instance().CharLog(ch, 0, "LOGIN", buf);
|
LogManager::instance().CharLog(ch, 0, "LOGIN", buf);
|
||||||
|
|
||||||
if (LC_IsYMIR() || LC_IsKorea() || LC_IsBrazil() || LC_IsJapan())
|
|
||||||
{
|
|
||||||
LogManager::instance().LoginLog(true,
|
|
||||||
ch->GetDesc()->GetAccountTable().id, ch->GetPlayerID(), ch->GetLevel(), ch->GetJob(), ch->GetRealPoint(POINT_PLAYTIME));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
d->SetPhase(PHASE_LOADING);
|
d->SetPhase(PHASE_LOADING);
|
||||||
|
@ -2414,15 +2408,12 @@ void CInputDB::GuildChangeMaster(TPacketChangeGuildMaster* p)
|
||||||
|
|
||||||
void CInputDB::DetailLog(const TPacketNeedLoginLogInfo* info)
|
void CInputDB::DetailLog(const TPacketNeedLoginLogInfo* info)
|
||||||
{
|
{
|
||||||
if (true == LC_IsEurope() || true == LC_IsYMIR() || true == LC_IsKorea() )
|
|
||||||
{
|
|
||||||
LPCHARACTER pChar = CHARACTER_MANAGER::instance().FindByPID( info->dwPlayerID );
|
LPCHARACTER pChar = CHARACTER_MANAGER::instance().FindByPID( info->dwPlayerID );
|
||||||
|
|
||||||
if (NULL != pChar)
|
if (NULL != pChar)
|
||||||
{
|
{
|
||||||
LogManager::instance().DetailLoginLog(true, pChar);
|
LogManager::instance().DetailLoginLog(true, pChar);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CInputDB::ItemAwardInformer(TPacketItemAwardInfromer *data)
|
void CInputDB::ItemAwardInformer(TPacketItemAwardInfromer *data)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include <common/teen_packet.h>
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
@ -91,7 +90,7 @@ void CInputLogin::Login(LPDESC d, const char * data)
|
||||||
|
|
||||||
TPacketGCLoginFailure failurePacket;
|
TPacketGCLoginFailure failurePacket;
|
||||||
|
|
||||||
if (g_iUseLocale && !test_server)
|
if (!test_server)
|
||||||
{
|
{
|
||||||
failurePacket.header = HEADER_GC_LOGIN_FAILURE;
|
failurePacket.header = HEADER_GC_LOGIN_FAILURE;
|
||||||
strlcpy(failurePacket.szStatus, "VERSION", sizeof(failurePacket.szStatus));
|
strlcpy(failurePacket.szStatus, "VERSION", sizeof(failurePacket.szStatus));
|
||||||
|
@ -431,22 +430,7 @@ void CInputLogin::CharacterCreate(LPDESC d, const char * data)
|
||||||
// 사용할 수 없는 이름이거나, 잘못된 평상복이면 생설 실패
|
// 사용할 수 없는 이름이거나, 잘못된 평상복이면 생설 실패
|
||||||
if (!check_name(pinfo->name) || pinfo->shape > 1)
|
if (!check_name(pinfo->name) || pinfo->shape > 1)
|
||||||
{
|
{
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
{
|
|
||||||
TPacketGCCreateFailure pack;
|
|
||||||
pack.header = HEADER_GC_CHARACTER_CREATE_FAILURE;
|
|
||||||
pack.bType = 1;
|
|
||||||
|
|
||||||
d->Packet(&pack, sizeof(pack));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
d->Packet(&packFailure, sizeof(packFailure));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LC_IsEurope() == true)
|
|
||||||
{
|
|
||||||
const TAccountTable & c_rAccountTable = d->GetAccountTable();
|
const TAccountTable & c_rAccountTable = d->GetAccountTable();
|
||||||
|
|
||||||
if (0 == strcmp(c_rAccountTable.login, pinfo->name))
|
if (0 == strcmp(c_rAccountTable.login, pinfo->name))
|
||||||
|
@ -620,8 +604,6 @@ void CInputLogin::Entergame(LPDESC d, const char * data)
|
||||||
SPDLOG_DEBUG("PREMIUM: {} type {} {}min", ch->GetName(), i, remain);
|
SPDLOG_DEBUG("PREMIUM: {} type {} {}min", ch->GetName(), i, remain);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsEurope())
|
|
||||||
{
|
|
||||||
if (g_bCheckClientVersion)
|
if (g_bCheckClientVersion)
|
||||||
{
|
{
|
||||||
int version = atoi(g_stClientVersion.c_str());
|
int version = atoi(g_stClientVersion.c_str());
|
||||||
|
@ -651,21 +633,9 @@ void CInputLogin::Entergame(LPDESC d, const char * data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
SPDLOG_WARN("VERSION : NO CHECK");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SPDLOG_WARN("VERSION : NO LOGIN");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LC_IsEurope() == true)
|
|
||||||
{
|
|
||||||
if (ch->IsGM() == true)
|
if (ch->IsGM() == true)
|
||||||
ch->ChatPacket(CHAT_TYPE_COMMAND, "ConsoleEnable");
|
ch->ChatPacket(CHAT_TYPE_COMMAND, "ConsoleEnable");
|
||||||
}
|
|
||||||
|
|
||||||
if (ch->GetMapIndex() >= 10000)
|
if (ch->GetMapIndex() >= 10000)
|
||||||
{
|
{
|
||||||
|
@ -752,19 +722,6 @@ void CInputLogin::Entergame(LPDESC d, const char * data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 청소년 보호
|
|
||||||
if (g_TeenDesc) // RawPacket 사용 금지
|
|
||||||
{
|
|
||||||
TPacketGTLogin p;
|
|
||||||
|
|
||||||
p.header = HEADER_GT_LOGIN;
|
|
||||||
p.empty = 0;
|
|
||||||
p.id = d->GetAccountTable().id;
|
|
||||||
|
|
||||||
g_TeenDesc->Packet(&p, sizeof(p));
|
|
||||||
SPDLOG_DEBUG("TEEN_SEND: ({}, {})", d->GetAccountTable().id, ch->GetName());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ch->GetHorseLevel() > 0)
|
if (ch->GetHorseLevel() > 0)
|
||||||
{
|
{
|
||||||
DWORD pid = ch->GetPlayerID();
|
DWORD pid = ch->GetPlayerID();
|
||||||
|
|
|
@ -411,10 +411,7 @@ int CInputMain::Whisper(LPCHARACTER ch, const char * data, size_t uiBytes)
|
||||||
return iExtraLen;
|
return iExtraLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsCanada() == false)
|
|
||||||
{
|
|
||||||
CBanwordManager::instance().ConvertString(buf, buflen);
|
CBanwordManager::instance().ConvertString(buf, buflen);
|
||||||
}
|
|
||||||
|
|
||||||
if (g_bEmpireWhisper)
|
if (g_bEmpireWhisper)
|
||||||
if (!ch->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_LANGUAGE))
|
if (!ch->IsEquipUniqueGroup(UNIQUE_GROUP_RING_OF_LANGUAGE))
|
||||||
|
@ -495,11 +492,6 @@ int CInputMain::Whisper(LPCHARACTER ch, const char * data, size_t uiBytes)
|
||||||
tmpbuf.write(buf, buflen);
|
tmpbuf.write(buf, buflen);
|
||||||
|
|
||||||
pkDesc->Packet(tmpbuf.read_peek(), tmpbuf.size());
|
pkDesc->Packet(tmpbuf.read_peek(), tmpbuf.size());
|
||||||
|
|
||||||
if (LC_IsEurope() != true)
|
|
||||||
{
|
|
||||||
SPDLOG_DEBUG("WHISPER: {} -> {} : {}", ch->GetName(), pinfo->szNameTo, buf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -695,10 +687,7 @@ int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes)
|
||||||
LogManager::instance().ShoutLog(g_bChannel, ch->GetEmpire(), chatbuf);
|
LogManager::instance().ShoutLog(g_bChannel, ch->GetEmpire(), chatbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsCanada() == false)
|
|
||||||
{
|
|
||||||
CBanwordManager::instance().ConvertString(buf, buflen);
|
CBanwordManager::instance().ConvertString(buf, buflen);
|
||||||
}
|
|
||||||
|
|
||||||
if (len < 0 || len >= (int) sizeof(chatbuf))
|
if (len < 0 || len >= (int) sizeof(chatbuf))
|
||||||
len = sizeof(chatbuf) - 1;
|
len = sizeof(chatbuf) - 1;
|
||||||
|
@ -722,7 +711,7 @@ int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes)
|
||||||
|
|
||||||
if (pinfo->type == CHAT_TYPE_SHOUT)
|
if (pinfo->type == CHAT_TYPE_SHOUT)
|
||||||
{
|
{
|
||||||
const int SHOUT_LIMIT_LEVEL = g_iUseLocale ? 15 : 3;
|
const int SHOUT_LIMIT_LEVEL = 15;
|
||||||
|
|
||||||
if (ch->GetLevel() < SHOUT_LIMIT_LEVEL)
|
if (ch->GetLevel() < SHOUT_LIMIT_LEVEL)
|
||||||
{
|
{
|
||||||
|
@ -1539,14 +1528,6 @@ void CInputMain::Move(LPCHARACTER ch, const char * data)
|
||||||
|
|
||||||
if (((false == ch->IsRiding() && fDist > 25) || fDist > 40) && OXEVENT_MAP_INDEX != ch->GetMapIndex())
|
if (((false == ch->IsRiding() && fDist > 25) || fDist > 40) && OXEVENT_MAP_INDEX != ch->GetMapIndex())
|
||||||
{
|
{
|
||||||
if( false == LC_IsEurope() )
|
|
||||||
{
|
|
||||||
const PIXEL_POSITION & warpPos = ch->GetWarpPosition();
|
|
||||||
|
|
||||||
if (warpPos.x == 0 && warpPos.y == 0)
|
|
||||||
LogManager::instance().HackLog("Teleport", ch); // 부정확할 수 있음
|
|
||||||
}
|
|
||||||
|
|
||||||
SPDLOG_WARN("MOVE: {} trying to move too far (dist: {:.1f}m) Riding({})", ch->GetName(), fDist, ch->IsRiding());
|
SPDLOG_WARN("MOVE: {} trying to move too far (dist: {:.1f}m) Riding({})", ch->GetName(), fDist, ch->IsRiding());
|
||||||
|
|
||||||
ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ());
|
ch->Show(ch->GetMapIndex(), ch->GetX(), ch->GetY(), ch->GetZ());
|
||||||
|
@ -2436,14 +2417,7 @@ void CInputMain::AnswerMakeGuild(LPCHARACTER ch, const char* c_pData)
|
||||||
|
|
||||||
int GuildCreateFee;
|
int GuildCreateFee;
|
||||||
|
|
||||||
if (LC_IsBrazil())
|
|
||||||
{
|
|
||||||
GuildCreateFee = 500000;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GuildCreateFee = 200000;
|
GuildCreateFee = 200000;
|
||||||
}
|
|
||||||
|
|
||||||
ch->PointChange(POINT_GOLD, -GuildCreateFee);
|
ch->PointChange(POINT_GOLD, -GuildCreateFee);
|
||||||
DBManager::instance().SendMoneyLog(MONEY_LOG_GUILD, ch->GetPlayerID(), -GuildCreateFee);
|
DBManager::instance().SendMoneyLog(MONEY_LOG_GUILD, ch->GetPlayerID(), -GuildCreateFee);
|
||||||
|
@ -2452,9 +2426,7 @@ void CInputMain::AnswerMakeGuild(LPCHARACTER ch, const char* c_pData)
|
||||||
snprintf(Log, sizeof(Log), "GUILD_NAME %s MASTER %s", cp.name, ch->GetName());
|
snprintf(Log, sizeof(Log), "GUILD_NAME %s MASTER %s", cp.name, ch->GetName());
|
||||||
LogManager::instance().CharLog(ch, 0, "MAKE_GUILD", Log);
|
LogManager::instance().CharLog(ch, 0, "MAKE_GUILD", Log);
|
||||||
|
|
||||||
if (g_iUseLocale)
|
|
||||||
ch->RemoveSpecifyItem(GUILD_CREATE_ITEM_VNUM, 1);
|
ch->RemoveSpecifyItem(GUILD_CREATE_ITEM_VNUM, 1);
|
||||||
//ch->SendGuildName(dwGuildID);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Guild] Creation of the guild has failed."));
|
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Guild] Creation of the guild has failed."));
|
||||||
|
@ -2606,15 +2578,6 @@ int CInputMain::Guild(LPCHARACTER ch, const char * data, size_t uiBytes)
|
||||||
if (!ch->IsPC())
|
if (!ch->IsPC())
|
||||||
return SubPacketLen;
|
return SubPacketLen;
|
||||||
|
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
{
|
|
||||||
if (newmember->GetQuestFlag("change_guild_master.be_other_member") > get_global_time())
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Guild] This character can't join yet"));
|
|
||||||
return SubPacketLen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pGuild->Invite(ch, newmember);
|
pGuild->Invite(ch, newmember);
|
||||||
}
|
}
|
||||||
return SubPacketLen;
|
return SubPacketLen;
|
||||||
|
@ -2651,11 +2614,6 @@ int CInputMain::Guild(LPCHARACTER ch, const char * data, size_t uiBytes)
|
||||||
|
|
||||||
member->SetQuestFlag("guild_manage.new_withdraw_time", get_global_time());
|
member->SetQuestFlag("guild_manage.new_withdraw_time", get_global_time());
|
||||||
pGuild->RequestRemoveMember(member->GetPlayerID());
|
pGuild->RequestRemoveMember(member->GetPlayerID());
|
||||||
|
|
||||||
if (LC_IsBrazil() == true)
|
|
||||||
{
|
|
||||||
DBManager::instance().Query("REPLACE INTO guild_invite_limit VALUES(%d, %d)", pGuild->GetID(), get_global_time());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2728,7 +2686,7 @@ int CInputMain::Guild(LPCHARACTER ch, const char * data, size_t uiBytes)
|
||||||
{
|
{
|
||||||
DWORD offer = *reinterpret_cast<const DWORD*>(c_pData);
|
DWORD offer = *reinterpret_cast<const DWORD*>(c_pData);
|
||||||
|
|
||||||
if (pGuild->GetLevel() >= GUILD_MAX_LEVEL && LC_IsHongKong() == false)
|
if (pGuild->GetLevel() >= GUILD_MAX_LEVEL)
|
||||||
{
|
{
|
||||||
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Guild] Your guild is already the highest level."));
|
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("[Guild] Your guild is already the highest level."));
|
||||||
}
|
}
|
||||||
|
@ -3050,8 +3008,6 @@ int CInputMain::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
|
||||||
case HEADER_CG_MOVE:
|
case HEADER_CG_MOVE:
|
||||||
Move(ch, c_pData);
|
Move(ch, c_pData);
|
||||||
|
|
||||||
if (LC_IsEurope())
|
|
||||||
{
|
|
||||||
if (g_bCheckClientVersion)
|
if (g_bCheckClientVersion)
|
||||||
{
|
{
|
||||||
int version = atoi(g_stClientVersion.c_str());
|
int version = atoi(g_stClientVersion.c_str());
|
||||||
|
@ -3065,15 +3021,6 @@ int CInputMain::Analyze(LPDESC d, BYTE bHeader, const char * c_pData)
|
||||||
LogManager::instance().HackLog("VERSION_CONFLICT", d->GetAccountTable().login, ch->GetName(), d->GetHostName());
|
LogManager::instance().HackLog("VERSION_CONFLICT", d->GetAccountTable().login, ch->GetName(), d->GetHostName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!*d->GetClientVersion())
|
|
||||||
{
|
|
||||||
SPDLOG_ERROR("Version not recieved name {}", ch->GetName());
|
|
||||||
d->SetPhase(PHASE_CLOSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HEADER_CG_CHARACTER_POSITION:
|
case HEADER_CG_CHARACTER_POSITION:
|
||||||
|
|
|
@ -329,12 +329,7 @@ void CInputP2P::XmasWarpSanta(const char * c_pData)
|
||||||
|
|
||||||
if (p->bChannel == g_bChannel && map_allow_find(p->lMapIndex))
|
if (p->bChannel == g_bChannel && map_allow_find(p->lMapIndex))
|
||||||
{
|
{
|
||||||
int iNextSpawnDelay = 60;
|
int iNextSpawnDelay = 50 * 60;
|
||||||
|
|
||||||
if (LC_IsYMIR())
|
|
||||||
iNextSpawnDelay = 20 * 60;
|
|
||||||
else
|
|
||||||
iNextSpawnDelay = 50 * 60;
|
|
||||||
|
|
||||||
xmas::SpawnSanta(p->lMapIndex, iNextSpawnDelay); // 50분있다가 새로운 산타가 나타남 (한국은 20분)
|
xmas::SpawnSanta(p->lMapIndex, iNextSpawnDelay); // 50분있다가 새로운 산타가 나타남 (한국은 20분)
|
||||||
|
|
||||||
|
|
|
@ -1,247 +0,0 @@
|
||||||
/*********************************************************************
|
|
||||||
* date : 2007.06.07
|
|
||||||
* file : input_teen.cpp
|
|
||||||
* author : mhh
|
|
||||||
* description :
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _input_teen_cpp_
|
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
#include "constants.h"
|
|
||||||
#include <common/teen_packet.h>
|
|
||||||
#include "input.h"
|
|
||||||
#include "desc.h"
|
|
||||||
#include "desc_manager.h"
|
|
||||||
#include "db.h"
|
|
||||||
#include "protocol.h"
|
|
||||||
#include "char.h"
|
|
||||||
|
|
||||||
#define HANDSHAKE_XOR 0x6AB3D224
|
|
||||||
|
|
||||||
void CInputTeen::SetStep(int step)
|
|
||||||
{
|
|
||||||
m_step = step;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CInputTeen::Process(LPDESC lpDesc, const void * c_pvOrig, int iBytes, int & r_iBytesProceed)
|
|
||||||
{
|
|
||||||
switch (m_step)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
return this->ProcessHandshake(lpDesc, c_pvOrig, iBytes, r_iBytesProceed);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
return this->ProcessMain(lpDesc, c_pvOrig, iBytes, r_iBytesProceed);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
} /* end of CInputTeen::Process() */
|
|
||||||
|
|
||||||
bool CInputTeen::ProcessHandshake(LPDESC lpDesc, const void * c_pvOrig, size_t uiBytes, int & r_iBytesProceed)
|
|
||||||
{
|
|
||||||
const char *c_pData = (const char*) c_pvOrig;
|
|
||||||
size_t packet_len = sizeof(DWORD);
|
|
||||||
|
|
||||||
if (uiBytes < packet_len)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
DWORD handshake = decode_4bytes(c_pData);
|
|
||||||
|
|
||||||
c_pData += packet_len;
|
|
||||||
m_iBufferLeft -= packet_len;
|
|
||||||
r_iBytesProceed += packet_len;
|
|
||||||
|
|
||||||
this->SetStep(1);
|
|
||||||
|
|
||||||
char buf[256];
|
|
||||||
*((DWORD *) buf) = handshake ^ HANDSHAKE_XOR;
|
|
||||||
lpDesc->Packet(buf, sizeof(DWORD));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int __packet_len(BYTE header)
|
|
||||||
{
|
|
||||||
const int header_size = sizeof(BYTE) + sizeof(WORD);
|
|
||||||
|
|
||||||
switch (header)
|
|
||||||
{
|
|
||||||
case HEADER_TG_TEEN_NOTICE: return (header_size + LOGIN_MAX_LEN + 4);
|
|
||||||
case HEADER_TG_FORCE_LOGOUT: return (header_size + LOGIN_MAX_LEN);
|
|
||||||
case HEADER_TG_LOGIN_NOTICE: return (header_size + LOGIN_MAX_LEN + 4 + 4);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void __proc_teen_notice(char *login, int hour)
|
|
||||||
{
|
|
||||||
LPDESC desc = DESC_MANAGER::instance().FindByLoginName(login);
|
|
||||||
if (NULL==desc) return;
|
|
||||||
|
|
||||||
LPCHARACTER ch = desc->GetCharacter();
|
|
||||||
if (NULL==ch) return;
|
|
||||||
|
|
||||||
switch (hour)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
{
|
|
||||||
SET_OVER_TIME(ch, OT_NONE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
case 2:
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative online time is already %d hours."), hour);
|
|
||||||
SET_OVER_TIME(ch, OT_NONE);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative online time has already reached %d hours,"), hour);
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Please disconnect as soon as possible and get some rest for your health."));
|
|
||||||
SET_OVER_TIME(ch, OT_3HOUR);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You have already entered game fatigue,"));
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("your in-game earnings are reduced to 50%% of normal."));
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("For your own health, please disconnect as soon as possible"));
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("and focus on resting and studying."));
|
|
||||||
SET_OVER_TIME(ch, OT_3HOUR);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You have already entered an unhealthy game time."));
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("For your health, please disconnect and rest as soon as possible,"));
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("otherwise you may suffer health damage and your in-game numbers will be zeroed out."));
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("You will return to normal when your cumulative offline time reaches 5 hours."));
|
|
||||||
SET_OVER_TIME(ch, OT_5HOUR);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void __sec_to_timestring(int sec, char *buf, size_t buflen)
|
|
||||||
{
|
|
||||||
int hour = (sec/60)/60;
|
|
||||||
int min = (sec/60);
|
|
||||||
|
|
||||||
if (hour>0)
|
|
||||||
snprintf(buf, buflen, LC_TEXT("%dh"), hour);
|
|
||||||
else
|
|
||||||
snprintf(buf, buflen, LC_TEXT("%dm"), min);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __proc_login_notice(char *login, int on_time, int off_time)
|
|
||||||
{
|
|
||||||
//{ check player's name
|
|
||||||
LPDESC desc = DESC_MANAGER::instance().FindByLoginName(login);
|
|
||||||
if (NULL==desc) return;
|
|
||||||
|
|
||||||
LPCHARACTER ch = desc->GetCharacter();
|
|
||||||
if (NULL==ch) return;
|
|
||||||
//} check player's name
|
|
||||||
|
|
||||||
char on_time_string[64];
|
|
||||||
char off_time_string[64];
|
|
||||||
|
|
||||||
__sec_to_timestring(on_time, on_time_string, sizeof(on_time_string));
|
|
||||||
__sec_to_timestring(off_time, off_time_string, sizeof(off_time_string));
|
|
||||||
|
|
||||||
if (0==on_time)
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative offline time is %s."), off_time_string);
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative online time is now zero. You are 100%% effective."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Your cumulative offline time is %s, and your cumulative online time is %s."),
|
|
||||||
off_time_string, on_time_string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void __input_teen(BYTE header, WORD desc_num, char *body)
|
|
||||||
{
|
|
||||||
switch (header)
|
|
||||||
{
|
|
||||||
case HEADER_TG_FORCE_LOGOUT:
|
|
||||||
{
|
|
||||||
char *data = body;
|
|
||||||
char login[LOGIN_MAX_LEN+1] = {0};
|
|
||||||
memcpy(login, data, LOGIN_MAX_LEN);
|
|
||||||
data += LOGIN_MAX_LEN;
|
|
||||||
LPDESC d = DESC_MANAGER::instance().FindByLoginName(login);
|
|
||||||
|
|
||||||
if (NULL==d)
|
|
||||||
return;
|
|
||||||
|
|
||||||
d->SetPhase(PHASE_CLOSE);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case HEADER_TG_TEEN_NOTICE:
|
|
||||||
{
|
|
||||||
char *data = body;
|
|
||||||
char login[LOGIN_MAX_LEN+1] = {0};
|
|
||||||
memcpy(login, data, LOGIN_MAX_LEN);
|
|
||||||
data += LOGIN_MAX_LEN;
|
|
||||||
int hour = decode_4bytes(data);
|
|
||||||
data += 4;
|
|
||||||
|
|
||||||
__proc_teen_notice(login, hour);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case HEADER_TG_LOGIN_NOTICE:
|
|
||||||
{
|
|
||||||
char *data = body;
|
|
||||||
char login[LOGIN_MAX_LEN+1] = {0};
|
|
||||||
memcpy(login, data, LOGIN_MAX_LEN);
|
|
||||||
data += LOGIN_MAX_LEN;
|
|
||||||
int on_time = decode_4bytes(data);
|
|
||||||
data += 4;
|
|
||||||
int off_time = decode_4bytes(data);
|
|
||||||
data += 4;
|
|
||||||
|
|
||||||
__proc_login_notice(login, on_time, off_time);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool CInputTeen::ProcessMain(LPDESC lpDesc, const void * c_pvOrig, size_t uiBytes, int & r_iBytesProceed)
|
|
||||||
{
|
|
||||||
const char *c_pData = (const char*) c_pvOrig;
|
|
||||||
const size_t header_size = sizeof(BYTE) + sizeof(WORD);
|
|
||||||
|
|
||||||
if (uiBytes < header_size)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
for (m_iBufferLeft = uiBytes; m_iBufferLeft > 0;)
|
|
||||||
{
|
|
||||||
BYTE header = decode_byte(c_pData);
|
|
||||||
WORD desc_num = decode_2bytes(c_pData+sizeof(BYTE));
|
|
||||||
char *body = (char*) c_pData + header_size;
|
|
||||||
|
|
||||||
int packet_len = __packet_len(header);
|
|
||||||
|
|
||||||
if (m_iBufferLeft < packet_len)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
c_pData += packet_len;
|
|
||||||
m_iBufferLeft -= packet_len;
|
|
||||||
r_iBytesProceed += packet_len;
|
|
||||||
|
|
||||||
__input_teen(header, desc_num, body);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1085,7 +1085,6 @@ void CItem::SetOwnership(LPCHARACTER ch, int iSec)
|
||||||
if (m_pkOwnershipEvent)
|
if (m_pkOwnershipEvent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (true == LC_IsEurope())
|
|
||||||
{
|
{
|
||||||
if (iSec <= 10)
|
if (iSec <= 10)
|
||||||
iSec = 30;
|
iSec = 30;
|
||||||
|
@ -1154,8 +1153,6 @@ void CItem::AlterToMagicItem()
|
||||||
int iSecondPct;
|
int iSecondPct;
|
||||||
int iThirdPct;
|
int iThirdPct;
|
||||||
|
|
||||||
if (g_iUseLocale)
|
|
||||||
{
|
|
||||||
switch (GetType())
|
switch (GetType())
|
||||||
{
|
{
|
||||||
case ITEM_WEAPON:
|
case ITEM_WEAPON:
|
||||||
|
@ -1180,34 +1177,7 @@ void CItem::AlterToMagicItem()
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
switch (GetType())
|
|
||||||
{
|
|
||||||
case ITEM_WEAPON:
|
|
||||||
iSecondPct = 30;
|
|
||||||
iThirdPct = 15;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ITEM_ARMOR:
|
|
||||||
case ITEM_COSTUME:
|
|
||||||
if (GetSubType() == ARMOR_BODY)
|
|
||||||
{
|
|
||||||
iSecondPct = 20;
|
|
||||||
iThirdPct = 10;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iSecondPct = 10;
|
|
||||||
iThirdPct = 5;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 100% 확률로 좋은 속성 하나
|
// 100% 확률로 좋은 속성 하나
|
||||||
PutAttribute(aiItemMagicAttributePercentHigh);
|
PutAttribute(aiItemMagicAttributePercentHigh);
|
||||||
|
|
|
@ -151,29 +151,6 @@ LPITEM ITEM_MANAGER::CreateItem(DWORD vnum, DWORD count, DWORD id, bool bTryMagi
|
||||||
dwMaskVnum = GetMaskVnum(vnum);
|
dwMaskVnum = GetMaskVnum(vnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsKorea() || LC_IsYMIR())
|
|
||||||
{
|
|
||||||
if (vnum == 50300 && bTryMagic)
|
|
||||||
{
|
|
||||||
// 수련서를 아이템 번호를 다르게 만들어 준다.
|
|
||||||
DWORD dwSkillVnum;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
dwSkillVnum = Random::get(1, 111);
|
|
||||||
|
|
||||||
CSkillProto * pkSk = CSkillManager::instance().Get(dwSkillVnum);
|
|
||||||
|
|
||||||
if (!pkSk)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
break;
|
|
||||||
} while (1);
|
|
||||||
|
|
||||||
vnum = 50400 + dwSkillVnum;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const TItemTable* table = GetTable(vnum);
|
const TItemTable* table = GetTable(vnum);
|
||||||
|
|
||||||
if (NULL == table)
|
if (NULL == table)
|
||||||
|
@ -768,7 +745,7 @@ int GetDropPerKillPct(int iMinimum, int iDefault, int iDeltaPercent, const char
|
||||||
|
|
||||||
if ((iVal = quest::CQuestManager::instance().GetEventFlag(c_pszFlag)))
|
if ((iVal = quest::CQuestManager::instance().GetEventFlag(c_pszFlag)))
|
||||||
{
|
{
|
||||||
if (!test_server && !LC_IsJapan())
|
if (!test_server)
|
||||||
{
|
{
|
||||||
if (iVal < iMinimum)
|
if (iVal < iMinimum)
|
||||||
iVal = iDefault;
|
iVal = iDefault;
|
||||||
|
@ -1055,55 +1032,6 @@ bool ITEM_MANAGER::CreateDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller, std::
|
||||||
DBManager::instance().SendMoneyLog(MONEY_LOG_DROP, item->GetVnum(), item->GetCount());
|
DBManager::instance().SendMoneyLog(MONEY_LOG_DROP, item->GetVnum(), item->GetCount());
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// 승룡곡 천의동굴 2층에서만 수룡방 입장권
|
|
||||||
//
|
|
||||||
if (LC_IsYMIR() || LC_IsKorea())
|
|
||||||
{
|
|
||||||
if (73 == pkKiller->GetMapIndex())
|
|
||||||
{
|
|
||||||
int per = 25; // 0.25%
|
|
||||||
if (Random::get(1, 10000) <= per)
|
|
||||||
{
|
|
||||||
LPITEM item = 0;
|
|
||||||
if ((item = CreateItem(71122, 1, 0, true)))
|
|
||||||
vec_item.push_back(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// 승룡곡 1층, 2층에서만 7,8 스킬입문서 드롭
|
|
||||||
//
|
|
||||||
if (LC_IsYMIR() || LC_IsKorea())
|
|
||||||
{
|
|
||||||
switch (pkKiller->GetMapIndex())
|
|
||||||
{
|
|
||||||
case 72: // 천의동굴 1층
|
|
||||||
case 73: // 천의동굴 2층
|
|
||||||
{
|
|
||||||
int vnum = 0;
|
|
||||||
|
|
||||||
if (2403 == pkChr->GetRaceNum()) // 천의법사
|
|
||||||
vnum = 69200; // 7스킬 입문서
|
|
||||||
else if (2411 == pkChr->GetRaceNum()) // 진천의병사
|
|
||||||
vnum = 69201; // 8스킬 입문서
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
|
|
||||||
int per = 5; // 0.05%
|
|
||||||
if (Random::get(1, 10000) <= per)
|
|
||||||
{
|
|
||||||
LPITEM item = 0;
|
|
||||||
item = CreateItem(vnum, 1, 0, true);
|
|
||||||
if (item)
|
|
||||||
vec_item.push_back(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return vec_item.size();
|
return vec_item.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1175,9 +1103,6 @@ static void __DropEvent_CharStone_DropItem(CHARACTER & killer, CHARACTER & victi
|
||||||
|
|
||||||
int MaxRange = 10000;
|
int MaxRange = 10000;
|
||||||
|
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
MaxRange = 20000;
|
|
||||||
|
|
||||||
if (Random::get(1, MaxRange) <= dropPercent)
|
if (Random::get(1, MaxRange) <= dropPercent)
|
||||||
{
|
{
|
||||||
int victim_level = victim.GetLevel();
|
int victim_level = victim.GetLevel();
|
||||||
|
@ -1386,16 +1311,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
// 크리스마스 양말
|
// 크리스마스 양말
|
||||||
if (quest::CQuestManager::instance().GetEventFlag("xmas_sock"))
|
if (quest::CQuestManager::instance().GetEventFlag("xmas_sock"))
|
||||||
{
|
{
|
||||||
//const DWORD SOCK_ITEM_VNUM = 50010;
|
const DWORD SOCK_ITEM_VNUM = 50010;
|
||||||
DWORD SOCK_ITEM_VNUM = 0;
|
|
||||||
if (LC_IsKorea() || LC_IsYMIR())
|
|
||||||
{
|
|
||||||
SOCK_ITEM_VNUM = (Random::get(1,100)<=50) ? 50010 : 71111;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SOCK_ITEM_VNUM = 50010;
|
|
||||||
}
|
|
||||||
|
|
||||||
int iDropPerKill[MOB_RANK_MAX_NUM] =
|
int iDropPerKill[MOB_RANK_MAX_NUM] =
|
||||||
{
|
{
|
||||||
|
@ -1411,11 +1327,6 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
{
|
{
|
||||||
int iPercent = 40000 * iDeltaPercent / iDropPerKill[pkChr->GetMobRank()];
|
int iPercent = 40000 * iDeltaPercent / iDropPerKill[pkChr->GetMobRank()];
|
||||||
|
|
||||||
if ( LC_IsHongKong() )
|
|
||||||
{
|
|
||||||
iPercent *= 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
SPDLOG_DEBUG("SOCK DROP {} {}", iPercent, iRandRange);
|
SPDLOG_DEBUG("SOCK DROP {} {}", iPercent, iRandRange);
|
||||||
if (iPercent >= Random::get(1, iRandRange))
|
if (iPercent >= Random::get(1, iRandRange))
|
||||||
{
|
{
|
||||||
|
@ -1452,8 +1363,6 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsEurope())
|
|
||||||
{
|
|
||||||
if (pkKiller->GetLevel() >= 15 && abs(pkKiller->GetLevel() - pkChr->GetLevel()) <= 5)
|
if (pkKiller->GetLevel() >= 15 && abs(pkKiller->GetLevel() - pkChr->GetLevel()) <= 5)
|
||||||
{
|
{
|
||||||
int pct = quest::CQuestManager::instance().GetEventFlag("hc_drop");
|
int pct = quest::CQuestManager::instance().GetEventFlag("hc_drop");
|
||||||
|
@ -1469,10 +1378,9 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//육각보합
|
//육각보합
|
||||||
if (GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "2006_drop") >= Random::get(1, iRandRange))
|
if (GetDropPerKillPct(100, 2000, iDeltaPercent, "2006_drop") >= Random::get(1, iRandRange))
|
||||||
{
|
{
|
||||||
SPDLOG_DEBUG("Hexagonal Treasure Chest DROP EVENT ");
|
SPDLOG_DEBUG("Hexagonal Treasure Chest DROP EVENT ");
|
||||||
|
|
||||||
|
@ -1484,7 +1392,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
}
|
}
|
||||||
|
|
||||||
//육각보합+
|
//육각보합+
|
||||||
if (GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "2007_drop") >= Random::get(1, iRandRange))
|
if (GetDropPerKillPct(100, 2000, iDeltaPercent, "2007_drop") >= Random::get(1, iRandRange))
|
||||||
{
|
{
|
||||||
SPDLOG_DEBUG("Hexagonal Treasure Chest DROP EVENT ");
|
SPDLOG_DEBUG("Hexagonal Treasure Chest DROP EVENT ");
|
||||||
|
|
||||||
|
@ -1498,7 +1406,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
if (GetDropPerKillPct(/* minimum */ 100, /* default */ 1000, iDeltaPercent, "newyear_fire") >= Random::get(1, iRandRange))
|
if (GetDropPerKillPct(/* minimum */ 100, /* default */ 1000, iDeltaPercent, "newyear_fire") >= Random::get(1, iRandRange))
|
||||||
{
|
{
|
||||||
// 중국은 폭죽, 한국 팽이
|
// 중국은 폭죽, 한국 팽이
|
||||||
const DWORD ITEM_VNUM_FIRE = g_iUseLocale ? 50107 : 50108;
|
const DWORD ITEM_VNUM_FIRE = 50107;
|
||||||
|
|
||||||
if ((item = CreateItem(ITEM_VNUM_FIRE, 1, 0, true)))
|
if ((item = CreateItem(ITEM_VNUM_FIRE, 1, 0, true)))
|
||||||
vec_item.push_back(item);
|
vec_item.push_back(item);
|
||||||
|
@ -1517,7 +1425,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 발렌타인 데이 이벤트. OGE의 요구에 따라 event 최소값을 1로 변경.(다른 이벤트는 일단 그대로 둠.)
|
// 발렌타인 데이 이벤트. OGE의 요구에 따라 event 최소값을 1로 변경.(다른 이벤트는 일단 그대로 둠.)
|
||||||
if (GetDropPerKillPct(1, g_iUseLocale ? 2000 : 800, iDeltaPercent, "valentine_drop") >= Random::get(1, iRandRange))
|
if (GetDropPerKillPct(1, 2000, iDeltaPercent, "valentine_drop") >= Random::get(1, iRandRange))
|
||||||
{
|
{
|
||||||
SPDLOG_DEBUG("EVENT VALENTINE_DROP");
|
SPDLOG_DEBUG("EVENT VALENTINE_DROP");
|
||||||
|
|
||||||
|
@ -1529,7 +1437,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 아이스크림 이벤트
|
// 아이스크림 이벤트
|
||||||
if (GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "icecream_drop") >= Random::get(1, iRandRange))
|
if (GetDropPerKillPct(100, 2000, iDeltaPercent, "icecream_drop") >= Random::get(1, iRandRange))
|
||||||
{
|
{
|
||||||
const static DWORD icecream = 50123;
|
const static DWORD icecream = 50123;
|
||||||
|
|
||||||
|
@ -1558,7 +1466,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
// vec_item.push_back(item);
|
// vec_item.push_back(item);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if ( GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "halloween_drop") >= Random::get(1, iRandRange) )
|
if ( GetDropPerKillPct(100, 2000, iDeltaPercent, "halloween_drop") >= Random::get(1, iRandRange) )
|
||||||
{
|
{
|
||||||
const static DWORD halloween_item = 30321;
|
const static DWORD halloween_item = 30321;
|
||||||
|
|
||||||
|
@ -1566,7 +1474,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
vec_item.push_back(item);
|
vec_item.push_back(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "ramadan_drop") >= Random::get(1, iRandRange) )
|
if ( GetDropPerKillPct(100, 2000, iDeltaPercent, "ramadan_drop") >= Random::get(1, iRandRange) )
|
||||||
{
|
{
|
||||||
const static DWORD ramadan_item = 30315;
|
const static DWORD ramadan_item = 30315;
|
||||||
|
|
||||||
|
@ -1574,7 +1482,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
vec_item.push_back(item);
|
vec_item.push_back(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "easter_drop") >= Random::get(1, iRandRange) )
|
if ( GetDropPerKillPct(100, 2000, iDeltaPercent, "easter_drop") >= Random::get(1, iRandRange) )
|
||||||
{
|
{
|
||||||
const static DWORD easter_item_base = 50160;
|
const static DWORD easter_item_base = 50160;
|
||||||
|
|
||||||
|
@ -1583,7 +1491,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 월드컵 이벤트
|
// 월드컵 이벤트
|
||||||
if ( GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "football_drop") >= Random::get(1, iRandRange) )
|
if ( GetDropPerKillPct(100, 2000, iDeltaPercent, "football_drop") >= Random::get(1, iRandRange) )
|
||||||
{
|
{
|
||||||
const static DWORD football_item = 50096;
|
const static DWORD football_item = 50096;
|
||||||
|
|
||||||
|
@ -1592,7 +1500,7 @@ void ITEM_MANAGER::CreateQuestDropItem(LPCHARACTER pkChr, LPCHARACTER pkKiller,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 화이트 데이 이벤트
|
// 화이트 데이 이벤트
|
||||||
if (GetDropPerKillPct(100, g_iUseLocale ? 2000 : 800, iDeltaPercent, "whiteday_drop") >= Random::get(1, iRandRange))
|
if (GetDropPerKillPct(100, 2000, iDeltaPercent, "whiteday_drop") >= Random::get(1, iRandRange))
|
||||||
{
|
{
|
||||||
SPDLOG_DEBUG("EVENT WHITEDAY_DROP");
|
SPDLOG_DEBUG("EVENT WHITEDAY_DROP");
|
||||||
const static DWORD whiteday_items[2] = { ITEM_WHITEDAY_ROSE, ITEM_WHITEDAY_CANDY };
|
const static DWORD whiteday_items[2] = { ITEM_WHITEDAY_ROSE, ITEM_WHITEDAY_CANDY };
|
||||||
|
|
|
@ -494,16 +494,9 @@ bool ITEM_MANAGER::ReadMonsterDropItemGroup(const char * c_pszFileName)
|
||||||
loader.GetCurrentNodeName(&stName);
|
loader.GetCurrentNodeName(&stName);
|
||||||
|
|
||||||
if (strncmp (stName.c_str(), "kr_", 3) == 0)
|
if (strncmp (stName.c_str(), "kr_", 3) == 0)
|
||||||
{
|
|
||||||
if (LC_IsYMIR())
|
|
||||||
{
|
|
||||||
stName.assign(stName, 3, stName.size() - 3);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
loader.SetChildNode(i);
|
loader.SetChildNode(i);
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,6 @@ typedef std::map< std::string, std::string > LocaleStringMapType;
|
||||||
|
|
||||||
LocaleStringMapType localeString;
|
LocaleStringMapType localeString;
|
||||||
|
|
||||||
int g_iUseLocale = 0;
|
|
||||||
|
|
||||||
void locale_add(const char **strings)
|
void locale_add(const char **strings)
|
||||||
{
|
{
|
||||||
LocaleStringMapType::const_iterator iter = localeString.find( strings[0] );
|
LocaleStringMapType::const_iterator iter = localeString.find( strings[0] );
|
||||||
|
@ -20,11 +18,6 @@ void locale_add(const char **strings)
|
||||||
|
|
||||||
const char * locale_find(const char *string)
|
const char * locale_find(const char *string)
|
||||||
{
|
{
|
||||||
if (0 == g_iUseLocale || LC_IsKorea() || LC_IsWE_Korea())
|
|
||||||
{
|
|
||||||
return (string);
|
|
||||||
}
|
|
||||||
|
|
||||||
LocaleStringMapType::const_iterator iter = localeString.find( string );
|
LocaleStringMapType::const_iterator iter = localeString.find( string );
|
||||||
|
|
||||||
if( iter == localeString.end() )
|
if( iter == localeString.end() )
|
||||||
|
@ -33,7 +26,7 @@ const char * locale_find(const char *string)
|
||||||
strlcpy(s_line + 5, string, sizeof(s_line) - 5);
|
strlcpy(s_line + 5, string, sizeof(s_line) - 5);
|
||||||
|
|
||||||
SPDLOG_ERROR("LOCALE_ERROR: \"{}\";", string);
|
SPDLOG_ERROR("LOCALE_ERROR: \"{}\";", string);
|
||||||
return s_line;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
return iter->second.c_str();
|
return iter->second.c_str();
|
||||||
|
|
|
@ -6,8 +6,6 @@ extern "C"
|
||||||
void locale_init(const char *filename);
|
void locale_init(const char *filename);
|
||||||
const char *locale_find(const char *string);
|
const char *locale_find(const char *string);
|
||||||
|
|
||||||
extern int g_iUseLocale;
|
|
||||||
|
|
||||||
#define LC_TEXT(str) locale_find(str)
|
#define LC_TEXT(str) locale_find(str)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -402,24 +402,6 @@ static void __LocaleService_Init_DEFAULT()
|
||||||
g_setQuestObjectDir.insert(g_stQuestDir + "/object");
|
g_setQuestObjectDir.insert(g_stQuestDir + "/object");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __LocaleService_Init_JAPAN()
|
|
||||||
{
|
|
||||||
g_stLocale = "sjis";
|
|
||||||
g_stServiceBasePath = "locale/japan";
|
|
||||||
g_stQuestDir = "locale/japan/quest";
|
|
||||||
g_stServiceMapPath = "locale/japan/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/japan/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/japan/sjis_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_sjis;
|
|
||||||
is_twobyte = is_twobyte_sjis;
|
|
||||||
exp_table = exp_table_euckr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_English()
|
static void __LocaleService_Init_English()
|
||||||
{
|
{
|
||||||
g_stLocale = "latin1";
|
g_stLocale = "latin1";
|
||||||
|
@ -431,553 +413,9 @@ static void __LocaleService_Init_English()
|
||||||
g_setQuestObjectDir.insert("locale/english/quest/object");
|
g_setQuestObjectDir.insert("locale/english/quest/object");
|
||||||
g_stLocaleFilename = "locale/english/locale_string.txt";
|
g_stLocaleFilename = "locale/english/locale_string.txt";
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
check_name = check_name_alphabet;
|
check_name = check_name_alphabet;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __LocaleService_Init_HongKong()
|
|
||||||
{
|
|
||||||
g_stLocale = "big5";
|
|
||||||
g_stServiceBasePath = "locale/hongkong";
|
|
||||||
g_stQuestDir = "locale/hongkong/quest";
|
|
||||||
g_stServiceMapPath = "locale/hongkong/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/hongkong/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/hongkong/big5_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_big5;
|
|
||||||
is_twobyte = is_twobyte_big5;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_NewCIBN()
|
|
||||||
{
|
|
||||||
g_stLocale = "gb2312";
|
|
||||||
g_stServiceBasePath = "locale/newcibn";
|
|
||||||
g_stQuestDir = "locale/newcibn/quest";
|
|
||||||
g_stServiceMapPath = "locale/newcibn/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/newcibn/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/newcibn/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_gb2312;
|
|
||||||
is_twobyte = is_twobyte_gb2312;
|
|
||||||
//exp_table = exp_table_newcibn;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Germany()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/germany";
|
|
||||||
g_stQuestDir = "locale/germany/quest";
|
|
||||||
g_stServiceMapPath = "locale/germany/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/germany/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/germany/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Korea()
|
|
||||||
{
|
|
||||||
g_stLocale="euckr";
|
|
||||||
g_stServiceBasePath = "locale/korea";
|
|
||||||
g_stQuestDir = "locale/korea/quest";
|
|
||||||
g_stServiceMapPath = "locale/korea/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/korea/quest/object");
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
exp_table = exp_table_euckr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_France()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/france";
|
|
||||||
g_stQuestDir = "locale/france/quest";
|
|
||||||
g_stServiceMapPath = "locale/france/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/france/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/france/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Italy()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/italy";
|
|
||||||
g_stQuestDir = "locale/italy/quest";
|
|
||||||
g_stServiceMapPath = "locale/italy/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/italy/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/italy/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_spain()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/spain";
|
|
||||||
g_stQuestDir = "locale/spain/quest";
|
|
||||||
g_stServiceMapPath = "locale/spain/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/spain/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/spain/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_greek()
|
|
||||||
{
|
|
||||||
g_stLocale="greek";
|
|
||||||
g_stServiceBasePath = "locale/greek";
|
|
||||||
g_stQuestDir = "locale/greek/quest";
|
|
||||||
g_stServiceMapPath = "locale/greek/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/greek/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/greek/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_UK()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/uk";
|
|
||||||
g_stQuestDir = "locale/uk/quest";
|
|
||||||
g_stServiceMapPath = "locale/uk/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/uk/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/uk/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Turkey()
|
|
||||||
{
|
|
||||||
g_stLocale="latin5";
|
|
||||||
g_stServiceBasePath = "locale/turkey";
|
|
||||||
g_stQuestDir = "locale/turkey/quest";
|
|
||||||
g_stServiceMapPath = "locale/turkey/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/turkey/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/turkey/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Poland()
|
|
||||||
{
|
|
||||||
g_stLocale="latin2";
|
|
||||||
g_stServiceBasePath = "locale/poland";
|
|
||||||
g_stQuestDir = "locale/poland/quest";
|
|
||||||
g_stServiceMapPath = "locale/poland/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/poland/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/poland/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Portugal()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/portugal";
|
|
||||||
g_stQuestDir = "locale/portugal/quest";
|
|
||||||
g_stServiceMapPath = "locale/portugal/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/portugal/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/portugal/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Canada()
|
|
||||||
{
|
|
||||||
g_stLocale = "latin1";
|
|
||||||
g_stServiceBasePath = "locale/canada";
|
|
||||||
g_stQuestDir = "locale/canada/quest";
|
|
||||||
g_stServiceMapPath = "locale/canada/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/canada/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/canada/locale_string.txt";
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Brazil()
|
|
||||||
{
|
|
||||||
g_stLocale = "latin1";
|
|
||||||
g_stServiceBasePath = "locale/brazil";
|
|
||||||
g_stQuestDir = "locale/brazil/quest";
|
|
||||||
g_stServiceMapPath = "locale/brazil/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/brazil/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/brazil/locale_string.txt";
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_YMIR()
|
|
||||||
{
|
|
||||||
g_stLocaleFilename = "";
|
|
||||||
|
|
||||||
g_stServiceBasePath = "locale/" + g_stServiceName;
|
|
||||||
g_stServiceMapPath = g_stServiceBasePath + "/map";
|
|
||||||
g_stQuestDir = g_stServiceBasePath + "/quest";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert(g_stQuestDir + "/object");
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 30;
|
|
||||||
|
|
||||||
exp_table = exp_table_euckr;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Russia()
|
|
||||||
{
|
|
||||||
g_stLocale="cp1251";
|
|
||||||
g_stServiceBasePath = "locale/russia";
|
|
||||||
g_stQuestDir = "locale/russia/quest";
|
|
||||||
g_stServiceMapPath = "locale/russia/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/russia/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/russia/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Denmark()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/denmark";
|
|
||||||
g_stQuestDir = "locale/denmark/quest";
|
|
||||||
g_stServiceMapPath = "locale/denmark/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/denmark/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/denmark/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Bulgaria()
|
|
||||||
{
|
|
||||||
g_stLocale="cp1251";
|
|
||||||
g_stServiceBasePath = "locale/bulgaria";
|
|
||||||
g_stQuestDir = "locale/bulgaria/quest";
|
|
||||||
g_stServiceMapPath = "locale/bulgaria/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/bulgaria/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/bulgaria/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Croatia()
|
|
||||||
{
|
|
||||||
g_stLocale="cp1251";
|
|
||||||
g_stServiceBasePath = "locale/croatia";
|
|
||||||
g_stQuestDir = "locale/croatia/quest";
|
|
||||||
g_stServiceMapPath = "locale/croatia/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/croatia/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/croatia/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Mexico()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/mexico";
|
|
||||||
g_stQuestDir = "locale/mexico/quest";
|
|
||||||
g_stServiceMapPath = "locale/mexico/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/mexico/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/mexico/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Arabia()
|
|
||||||
{
|
|
||||||
g_stLocale="cp1256";
|
|
||||||
g_stServiceBasePath = "locale/arabia";
|
|
||||||
g_stQuestDir = "locale/arabia/quest";
|
|
||||||
g_stServiceMapPath = "locale/arabia/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/arabia/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/arabia/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Czech()
|
|
||||||
{
|
|
||||||
g_stLocale="latin2";
|
|
||||||
g_stServiceBasePath = "locale/czech";
|
|
||||||
g_stQuestDir = "locale/czech/quest";
|
|
||||||
g_stServiceMapPath = "locale/czech/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/czech/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/czech/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Hungary()
|
|
||||||
{
|
|
||||||
g_stLocale="latin2";
|
|
||||||
g_stServiceBasePath = "locale/hungary";
|
|
||||||
g_stQuestDir = "locale/hungary/quest";
|
|
||||||
g_stServiceMapPath = "locale/hungary/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/hungary/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/hungary/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Romania()
|
|
||||||
{
|
|
||||||
g_stLocale="latin2";
|
|
||||||
g_stServiceBasePath = "locale/romania";
|
|
||||||
g_stQuestDir = "locale/romania/quest";
|
|
||||||
g_stServiceMapPath = "locale/romania/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/romania/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/romania/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Netherlands()
|
|
||||||
{
|
|
||||||
g_stLocale="latin1";
|
|
||||||
g_stServiceBasePath = "locale/netherlands";
|
|
||||||
g_stQuestDir = "locale/netherlands/quest";
|
|
||||||
g_stServiceMapPath = "locale/netherlands/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/netherlands/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/netherlands/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Singapore()
|
|
||||||
{
|
|
||||||
g_stLocale = "latin1";
|
|
||||||
g_stServiceBasePath = "locale/singapore";
|
|
||||||
g_stQuestDir = "locale/singapore/quest";
|
|
||||||
g_stServiceMapPath = "locale/singapore/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/singapore/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/singapore/locale_string.txt";
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
//exp_table = exp_table_newcibn; 2013 09 11 CYH europe 과 동일하게 간다.
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Vietnam()
|
|
||||||
{
|
|
||||||
g_stLocale = "latin1";
|
|
||||||
g_stServiceBasePath = "locale/vietnam";
|
|
||||||
g_stQuestDir = "locale/vietnam/quest";
|
|
||||||
g_stServiceMapPath = "locale/vietnam/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/vietnam/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/vietnam/locale_string.txt";
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
exp_table = exp_table_newcibn;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Thailand()
|
|
||||||
{
|
|
||||||
g_stLocale = "latin1";
|
|
||||||
g_stServiceBasePath = "locale/thailand";
|
|
||||||
g_stQuestDir = "locale/thailand/quest";
|
|
||||||
g_stServiceMapPath = "locale/thailand/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/thailand/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/thailand/locale_string.txt";
|
|
||||||
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_USA()
|
|
||||||
{
|
|
||||||
g_stLocale = "latin1";
|
|
||||||
g_stServiceBasePath = "locale/usa";
|
|
||||||
g_stQuestDir = "locale/usa/quest";
|
|
||||||
g_stServiceMapPath = "locale/usa/map";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert("locale/usa/quest/object");
|
|
||||||
g_stLocaleFilename = "locale/usa/locale_string.txt";
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
check_name = check_name_alphabet;
|
|
||||||
}
|
|
||||||
|
|
||||||
// World Edition version for korea
|
|
||||||
static void __LocaleService_Init_WE_Korea()
|
|
||||||
{
|
|
||||||
g_stLocale = "euckr";
|
|
||||||
|
|
||||||
// g_stLocaleFilename = "locale/we_korea/locale_string.txt";
|
|
||||||
|
|
||||||
g_stServiceBasePath = "locale/" + g_stServiceName;
|
|
||||||
g_stServiceMapPath = g_stServiceBasePath + "/map";
|
|
||||||
g_stQuestDir = g_stServiceBasePath + "/quest";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert(g_stQuestDir + "/object");
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __LocaleService_Init_Taiwan()
|
|
||||||
{
|
|
||||||
g_stLocale = "big5";
|
|
||||||
g_stServiceBasePath = "locale/" + g_stServiceName;
|
|
||||||
g_stServiceMapPath = g_stServiceBasePath + "/map";
|
|
||||||
g_stQuestDir = g_stServiceBasePath + "/quest";
|
|
||||||
|
|
||||||
g_setQuestObjectDir.clear();
|
|
||||||
g_setQuestObjectDir.insert(g_stQuestDir + "/object");
|
|
||||||
g_stLocaleFilename = "locale/taiwan/locale_string.txt";
|
|
||||||
|
|
||||||
check_name = check_name_big5;
|
|
||||||
is_twobyte = is_twobyte_big5;
|
|
||||||
|
|
||||||
g_iUseLocale = true;
|
|
||||||
|
|
||||||
PK_PROTECT_LEVEL = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __CheckPlayerSlot(const std::string& service_name)
|
static void __CheckPlayerSlot(const std::string& service_name)
|
||||||
{
|
{
|
||||||
if (PLAYER_PER_ACCOUNT != 4)
|
if (PLAYER_PER_ACCOUNT != 4)
|
||||||
|
@ -995,144 +433,7 @@ bool LocaleService_Init(const std::string& c_rstServiceName)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_stServiceName = c_rstServiceName;
|
|
||||||
|
|
||||||
if ( "japan" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_JAPAN();
|
|
||||||
}
|
|
||||||
else if ( "english" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_English();
|
__LocaleService_Init_English();
|
||||||
}
|
|
||||||
else if ( "hongkong" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_HongKong();
|
|
||||||
}
|
|
||||||
else if ( "newcibn" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_NewCIBN();
|
|
||||||
}
|
|
||||||
else if ( "germany" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Germany();
|
|
||||||
}
|
|
||||||
else if ( "korea" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Korea();
|
|
||||||
}
|
|
||||||
else if ( "france" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_France();
|
|
||||||
}
|
|
||||||
else if ( "italy" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Italy();
|
|
||||||
}
|
|
||||||
else if ( "spain" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_spain();
|
|
||||||
}
|
|
||||||
else if ( "greek" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_greek();
|
|
||||||
}
|
|
||||||
else if ( "uk" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_UK();
|
|
||||||
}
|
|
||||||
else if ( "turkey" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Turkey();
|
|
||||||
}
|
|
||||||
else if ( "poland" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Poland();
|
|
||||||
}
|
|
||||||
else if ( "portugal" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Portugal();
|
|
||||||
}
|
|
||||||
else if ( "canada" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Canada();
|
|
||||||
}
|
|
||||||
else if ( "brazil" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Brazil();
|
|
||||||
}
|
|
||||||
else if ( "ymir" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_YMIR();
|
|
||||||
}
|
|
||||||
else if ( "russia" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Russia();
|
|
||||||
}
|
|
||||||
else if ( "denmark" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Denmark();
|
|
||||||
}
|
|
||||||
else if ( "bulgaria" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Bulgaria();
|
|
||||||
}
|
|
||||||
else if ( "croatia" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Croatia();
|
|
||||||
}
|
|
||||||
else if ( "mexico" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Mexico();
|
|
||||||
}
|
|
||||||
else if ( "arabia" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Arabia();
|
|
||||||
}
|
|
||||||
else if ( "czech" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Czech();
|
|
||||||
}
|
|
||||||
else if ( "romania" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Romania();
|
|
||||||
}
|
|
||||||
else if ( "hungary" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Hungary();
|
|
||||||
}
|
|
||||||
else if ( "netherlands" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Netherlands();
|
|
||||||
}
|
|
||||||
else if ( "singapore" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Singapore();
|
|
||||||
}
|
|
||||||
else if ( "vietnam" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Vietnam();
|
|
||||||
}
|
|
||||||
else if ( "thailand" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Thailand();
|
|
||||||
}
|
|
||||||
else if ("usa" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_USA();
|
|
||||||
}
|
|
||||||
else if ("we_korea" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_WE_Korea(); // ver.World Edition for korea
|
|
||||||
}
|
|
||||||
else if ("taiwan" == g_stServiceName)
|
|
||||||
{
|
|
||||||
__LocaleService_Init_Taiwan();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
__LocaleService_Init_DEFAULT();
|
|
||||||
}
|
|
||||||
|
|
||||||
SPDLOG_INFO("Setting Locale \"{}\" (Path: {})", g_stServiceName.c_str(), g_stServiceBasePath.c_str());
|
SPDLOG_INFO("Setting Locale \"{}\" (Path: {})", g_stServiceName.c_str(), g_stServiceBasePath.c_str());
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,6 @@ void LogManager::ShoutLog(BYTE bChannel, BYTE bEmpire, const char * pszText)
|
||||||
|
|
||||||
void LogManager::LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int playhour)
|
void LogManager::LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int playhour)
|
||||||
{
|
{
|
||||||
if (true == LC_IsEurope())
|
|
||||||
{
|
{
|
||||||
DWORD aid = 0;
|
DWORD aid = 0;
|
||||||
|
|
||||||
|
@ -231,11 +230,6 @@ void LogManager::LevelLog(LPCHARACTER pChar, unsigned int level, unsigned int pl
|
||||||
Query("REPLACE INTO levellog%s (name, level, time, account_id, pid, playtime) VALUES('%s', %u, NOW(), %u, %u, %d)",
|
Query("REPLACE INTO levellog%s (name, level, time, account_id, pid, playtime) VALUES('%s', %u, NOW(), %u, %u, %d)",
|
||||||
get_table_postfix(), pChar->GetName(), level, aid, pChar->GetPlayerID(), playhour);
|
get_table_postfix(), pChar->GetName(), level, aid, pChar->GetPlayerID(), playhour);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Query("REPLACE INTO levellog%s (name, level, time, playtime) VALUES('%s', %u, NOW(), %d)",
|
|
||||||
get_table_postfix(), pChar->GetName(), level, playhour);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogManager::BootLog(const char * c_pszHostName, BYTE bChannel)
|
void LogManager::BootLog(const char * c_pszHostName, BYTE bChannel)
|
||||||
|
|
|
@ -677,22 +677,6 @@ int start(int argc, char **argv)
|
||||||
SPDLOG_INFO("MasterAuth {}", (int) LC_GetLocalType());
|
SPDLOG_INFO("MasterAuth {}", (int) LC_GetLocalType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* game server to teen server */
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (teen_addr[0] && teen_port)
|
|
||||||
g_TeenDesc = DESC_MANAGER::instance().CreateConnectionDesc(ev_base, dns_base, teen_addr, teen_port, PHASE_TEEN, true);
|
|
||||||
|
|
||||||
extern unsigned int g_uiSpamBlockDuration;
|
|
||||||
extern unsigned int g_uiSpamBlockScore;
|
|
||||||
extern unsigned int g_uiSpamReloadCycle;
|
|
||||||
|
|
||||||
SPDLOG_INFO("SPAM_CONFIG: duration {} score {} reload cycle {}",
|
|
||||||
g_uiSpamBlockDuration, g_uiSpamBlockScore, g_uiSpamReloadCycle);
|
|
||||||
|
|
||||||
extern void LoadSpamDB();
|
|
||||||
LoadSpamDB();
|
|
||||||
}
|
|
||||||
|
|
||||||
signal_timer_enable(30);
|
signal_timer_enable(30);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -141,10 +141,7 @@ void P2P_MANAGER::Login(LPDESC d, const TPacketGGLogin * p)
|
||||||
UpdateP2P = true;
|
UpdateP2P = true;
|
||||||
pkCCI = M2_NEW CCI;
|
pkCCI = M2_NEW CCI;
|
||||||
|
|
||||||
if (false == LC_IsBrazil())
|
|
||||||
strlcpy(pkCCI->szName, p->szName, sizeof(pkCCI->szName));
|
strlcpy(pkCCI->szName, p->szName, sizeof(pkCCI->szName));
|
||||||
else
|
|
||||||
trim_and_lower(p->szName, pkCCI->szName, sizeof(pkCCI->szName));
|
|
||||||
|
|
||||||
pkCCI->dwPID = p->dwPID;
|
pkCCI->dwPID = p->dwPID;
|
||||||
pkCCI->bEmpire = p->bEmpire;
|
pkCCI->bEmpire = p->bEmpire;
|
||||||
|
@ -233,17 +230,9 @@ CCI * P2P_MANAGER::Find(const char * c_pszName)
|
||||||
{
|
{
|
||||||
TCCIMap::const_iterator it;
|
TCCIMap::const_iterator it;
|
||||||
|
|
||||||
if( false == LC_IsBrazil() )
|
|
||||||
{
|
{
|
||||||
it = m_map_pkCCI.find(c_pszName);
|
it = m_map_pkCCI.find(c_pszName);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
char szName[CHARACTER_NAME_MAX_LEN + 1];
|
|
||||||
trim_and_lower(c_pszName, szName, sizeof(szName));
|
|
||||||
|
|
||||||
it = m_map_pkCCI.find(szName);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (it == m_map_pkCCI.end())
|
if (it == m_map_pkCCI.end())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -820,7 +820,6 @@ enum EPhase
|
||||||
PHASE_DBCLIENT,
|
PHASE_DBCLIENT,
|
||||||
PHASE_P2P,
|
PHASE_P2P,
|
||||||
PHASE_AUTH,
|
PHASE_AUTH,
|
||||||
PHASE_TEEN,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct packet_phase
|
typedef struct packet_phase
|
||||||
|
|
|
@ -1356,7 +1356,7 @@ void CParty::Update()
|
||||||
bool bLongTimeExpBonusChanged = false;
|
bool bLongTimeExpBonusChanged = false;
|
||||||
|
|
||||||
// 파티 결성 후 충분한 시간이 지나면 경험치 보너스를 받는다.
|
// 파티 결성 후 충분한 시간이 지나면 경험치 보너스를 받는다.
|
||||||
if (!m_iLongTimeExpBonus && (get_dword_time() - m_dwPartyStartTime > PARTY_ENOUGH_MINUTE_FOR_EXP_BONUS * 60 * 1000 / (g_iUseLocale?1:2)))
|
if (!m_iLongTimeExpBonus && (get_dword_time() - m_dwPartyStartTime > PARTY_ENOUGH_MINUTE_FOR_EXP_BONUS * 60 * 1000 / 1))
|
||||||
{
|
{
|
||||||
bLongTimeExpBonusChanged = true;
|
bLongTimeExpBonusChanged = true;
|
||||||
m_iLongTimeExpBonus = 5;
|
m_iLongTimeExpBonus = 5;
|
||||||
|
@ -1680,22 +1680,11 @@ int CParty::ComputePartyBonusExpPercent()
|
||||||
|
|
||||||
if (leader && (leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP) || leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP_MALL)
|
if (leader && (leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP) || leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP_MALL)
|
||||||
|| leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP_GIFT) || leader->IsEquipUniqueGroup(10010)))
|
|| leader->IsEquipUniqueItem(UNIQUE_ITEM_PARTY_BONUS_EXP_GIFT) || leader->IsEquipUniqueGroup(10010)))
|
||||||
{
|
|
||||||
// 중국측 육도 적용을 확인해야한다.
|
|
||||||
if (g_iUseLocale)
|
|
||||||
{
|
{
|
||||||
iBonusPartyExpFromItem = 30;
|
iBonusPartyExpFromItem = 30;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
iBonusPartyExpFromItem = KOR_aiUniqueItemPartyBonusExpPercentByMemberCount[iMemberCount];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (g_iUseLocale)
|
|
||||||
return iBonusPartyExpFromItem + CHN_aiPartyBonusExpPercentByMemberCount[iMemberCount];
|
return iBonusPartyExpFromItem + CHN_aiPartyBonusExpPercentByMemberCount[iMemberCount];
|
||||||
else
|
|
||||||
return iBonusPartyExpFromItem + KOR_aiPartyBonusExpPercentByMemberCount[iMemberCount];
|
|
||||||
// END_OF_UPGRADE_PARTY_BONUS
|
// END_OF_UPGRADE_PARTY_BONUS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -431,14 +431,6 @@ bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim)
|
||||||
|
|
||||||
if (pkChr->GetEmpire() != pkVictim->GetEmpire())
|
if (pkChr->GetEmpire() != pkVictim->GetEmpire())
|
||||||
{
|
{
|
||||||
if ( LC_IsYMIR() == true || LC_IsKorea() == true )
|
|
||||||
{
|
|
||||||
if ( pkChr->GetPKMode() == PK_MODE_PROTECT || pkVictim->GetPKMode() == PK_MODE_PROTECT )
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,9 +468,6 @@ bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (pkChr->GetPKMode() == PK_MODE_REVENGE)
|
if (pkChr->GetPKMode() == PK_MODE_REVENGE)
|
||||||
{
|
|
||||||
//if (!g_iUseLocale)
|
|
||||||
if (1)
|
|
||||||
{
|
{
|
||||||
if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() >= 0)
|
if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() >= 0)
|
||||||
{
|
{
|
||||||
|
@ -488,24 +477,11 @@ bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim)
|
||||||
else if (pkChr->GetAlignment() >= 0 && pkVictim->GetAlignment() < 0)
|
else if (pkChr->GetAlignment() >= 0 && pkVictim->GetAlignment() < 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0)
|
|
||||||
break;
|
|
||||||
else if (pkChr->GetAlignment() >= 0 && pkVictim->GetAlignment() >= 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
beKillerMode = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PK_MODE_GUILD:
|
case PK_MODE_GUILD:
|
||||||
// Same implementation from PK_MODE_FREE except for attacking same guild
|
// Same implementation from PK_MODE_FREE except for attacking same guild
|
||||||
if (!pkChr->GetGuild() || (pkVictim->GetGuild() != pkChr->GetGuild()))
|
if (!pkChr->GetGuild() || (pkVictim->GetGuild() != pkChr->GetGuild()))
|
||||||
{
|
|
||||||
if (1)
|
|
||||||
//if (!g_iUseLocale)
|
|
||||||
{
|
{
|
||||||
if (pkVictim->GetAlignment() >= 0)
|
if (pkVictim->GetAlignment() >= 0)
|
||||||
pkChr->SetKillerMode(true);
|
pkChr->SetKillerMode(true);
|
||||||
|
@ -514,15 +490,9 @@ bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
beKillerMode = true;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PK_MODE_FREE:
|
case PK_MODE_FREE:
|
||||||
//if (!g_iUseLocale)
|
|
||||||
if (1)
|
|
||||||
{
|
|
||||||
if (pkVictim->GetAlignment() >= 0)
|
if (pkVictim->GetAlignment() >= 0)
|
||||||
pkChr->SetKillerMode(true);
|
pkChr->SetKillerMode(true);
|
||||||
else if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0)
|
else if (pkChr->GetAlignment() < 0 && pkVictim->GetAlignment() < 0)
|
||||||
|
@ -530,10 +500,6 @@ bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
beKillerMode = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CPVP kPVP(pkChr->GetPlayerID(), pkVictim->GetPlayerID());
|
CPVP kPVP(pkChr->GetPlayerID(), pkVictim->GetPlayerID());
|
||||||
|
|
|
@ -510,7 +510,7 @@ namespace quest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LC_IsEurope())
|
|
||||||
{
|
{
|
||||||
char translateFileName[256];
|
char translateFileName[256];
|
||||||
snprintf(translateFileName, sizeof(translateFileName), "%s/translate.lua", LocaleService_GetBasePath().c_str());
|
snprintf(translateFileName, sizeof(translateFileName), "%s/translate.lua", LocaleService_GetBasePath().c_str());
|
||||||
|
@ -526,14 +526,7 @@ namespace quest
|
||||||
|
|
||||||
{
|
{
|
||||||
char questLocaleFileName[256];
|
char questLocaleFileName[256];
|
||||||
if (LC_IsEurope())
|
|
||||||
{
|
|
||||||
snprintf(questLocaleFileName, sizeof(questLocaleFileName), "%s/locale.lua", g_stQuestDir.c_str());
|
snprintf(questLocaleFileName, sizeof(questLocaleFileName), "%s/locale.lua", g_stQuestDir.c_str());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
snprintf(questLocaleFileName, sizeof(questLocaleFileName), "%s/locale_%s.lua", g_stQuestDir.c_str(), g_stLocale.c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
int questLocaleLoadingResult = lua_dofile(L, questLocaleFileName);
|
int questLocaleLoadingResult = lua_dofile(L, questLocaleFileName);
|
||||||
SPDLOG_DEBUG("LoadQuestLocale({}), returns {}", questLocaleFileName, questLocaleLoadingResult);
|
SPDLOG_DEBUG("LoadQuestLocale({}), returns {}", questLocaleFileName, questLocaleLoadingResult);
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
#include "char_manager.h"
|
#include "char_manager.h"
|
||||||
#include "arena.h"
|
#include "arena.h"
|
||||||
|
|
||||||
extern bool LC_IsCanada();
|
|
||||||
|
|
||||||
namespace quest
|
namespace quest
|
||||||
{
|
{
|
||||||
int arena_start_duel(lua_State * L)
|
int arena_start_duel(lua_State * L)
|
||||||
|
@ -39,15 +37,6 @@ namespace quest
|
||||||
lua_pushnumber(L, 2);
|
lua_pushnumber(L, 2);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
{
|
|
||||||
if ( CArenaManager::instance().StartDuel(ch, ch2, nSetPoint, 10) == false )
|
|
||||||
{
|
|
||||||
lua_pushnumber(L, 3);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
if ( CArenaManager::instance().StartDuel(ch, ch2, nSetPoint) == false )
|
if ( CArenaManager::instance().StartDuel(ch, ch2, nSetPoint) == false )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2063,72 +2063,10 @@ teleport_area:
|
||||||
// 3: 이미 같은 이름이 사용중
|
// 3: 이미 같은 이름이 사용중
|
||||||
// 4: 성공
|
// 4: 성공
|
||||||
// 5: 해당 기능 지원하지 않음
|
// 5: 해당 기능 지원하지 않음
|
||||||
if ( LC_IsEurope() )
|
|
||||||
{
|
|
||||||
lua_pushnumber(L, 5);
|
lua_pushnumber(L, 5);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
|
|
||||||
|
|
||||||
if ( ch->GetNewName().size() != 0 )
|
|
||||||
{
|
|
||||||
lua_pushnumber(L, 0);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( lua_isstring(L, 1) != true )
|
|
||||||
{
|
|
||||||
lua_pushnumber(L, 1);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char * szName = lua_tostring(L, 1);
|
|
||||||
|
|
||||||
if ( check_name(szName) == false )
|
|
||||||
{
|
|
||||||
lua_pushnumber(L, 2);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
char szQuery[1024];
|
|
||||||
snprintf(szQuery, sizeof(szQuery), "SELECT COUNT(*) FROM player%s WHERE name='%s'", get_table_postfix(), szName);
|
|
||||||
std::unique_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery(szQuery));
|
|
||||||
|
|
||||||
if ( pmsg->Get()->uiNumRows > 0 )
|
|
||||||
{
|
|
||||||
MYSQL_ROW row = mysql_fetch_row(pmsg->Get()->pSQLResult);
|
|
||||||
|
|
||||||
int count = 0;
|
|
||||||
str_to_number(count, row[0]);
|
|
||||||
|
|
||||||
// 이미 해당 이름을 가진 캐릭터가 있음
|
|
||||||
if ( count != 0 )
|
|
||||||
{
|
|
||||||
lua_pushnumber(L, 3);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DWORD pid = ch->GetPlayerID();
|
|
||||||
db_clientdesc->DBPacketHeader(HEADER_GD_FLUSH_CACHE, 0, sizeof(DWORD));
|
|
||||||
db_clientdesc->Packet(&pid, sizeof(DWORD));
|
|
||||||
|
|
||||||
/* delete messenger list */
|
|
||||||
MessengerManager::instance().RemoveAllList(ch->GetName());
|
|
||||||
|
|
||||||
/* change_name_log */
|
|
||||||
LogManager::instance().ChangeNameLog(pid, ch->GetName(), szName, ch->GetDesc()->GetHostName());
|
|
||||||
|
|
||||||
snprintf(szQuery, sizeof(szQuery), "UPDATE player%s SET name='%s' WHERE id=%u", get_table_postfix(), szName, pid);
|
|
||||||
SQLMsg * msg = DBManager::instance().DirectQuery(szQuery);
|
|
||||||
M2_DELETE(msg);
|
|
||||||
|
|
||||||
ch->SetNewName(szName);
|
|
||||||
lua_pushnumber(L, 4);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int pc_is_dead(lua_State* L)
|
int pc_is_dead(lua_State* L)
|
||||||
{
|
{
|
||||||
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
|
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
|
||||||
|
|
|
@ -133,16 +133,8 @@ namespace quest
|
||||||
m_mapNPC[0].Set(0, "notarget");
|
m_mapNPC[0].Set(0, "notarget");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_iUseLocale)
|
|
||||||
{
|
|
||||||
SetEventFlag("guild_withdraw_delay", 1);
|
SetEventFlag("guild_withdraw_delay", 1);
|
||||||
SetEventFlag("guild_disband_delay", 1);
|
SetEventFlag("guild_disband_delay", 1);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetEventFlag("guild_withdraw_delay", 3);
|
|
||||||
SetEventFlag("guild_disband_delay", 7);
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1319,7 +1311,7 @@ namespace quest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (name == "pre_event_hc" && true == LC_IsEurope())
|
else if (name == "pre_event_hc")
|
||||||
{
|
{
|
||||||
const DWORD EventNPC = 20090;
|
const DWORD EventNPC = 20090;
|
||||||
|
|
||||||
|
|
|
@ -76,67 +76,6 @@ LPSECTREE SECTREE_MAP::Find(DWORD x, DWORD y)
|
||||||
|
|
||||||
void SECTREE_MAP::Build()
|
void SECTREE_MAP::Build()
|
||||||
{
|
{
|
||||||
// 클라이언트에게 반경 150m 캐릭터의 정보를 주기위해
|
|
||||||
// 3x3칸 -> 5x5 칸으로 주변sectree 확대(한국)
|
|
||||||
if (LC_IsYMIR() || LC_IsKorea())
|
|
||||||
{
|
|
||||||
#define NEIGHBOR_LENGTH 5
|
|
||||||
#define NUM_OF_NEIGHBORS (NEIGHBOR_LENGTH * NEIGHBOR_LENGTH - 1)
|
|
||||||
int width = NEIGHBOR_LENGTH / 2;
|
|
||||||
struct neighbor_coord_s
|
|
||||||
{
|
|
||||||
int x;
|
|
||||||
int y;
|
|
||||||
} neighbor_coord[NUM_OF_NEIGHBORS];
|
|
||||||
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
for (int x = -width; x <= width; ++x)
|
|
||||||
{
|
|
||||||
for (int y = -width; y <= width; ++y)
|
|
||||||
{
|
|
||||||
if (x == 0 && y == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
neighbor_coord[i].x = x * SECTREE_SIZE;
|
|
||||||
neighbor_coord[i].y = y * SECTREE_SIZE;
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// 모든 sectree에 대해 주위 sectree들 리스트를 만든다.
|
|
||||||
//
|
|
||||||
MapType::iterator it = map_.begin();
|
|
||||||
|
|
||||||
while (it != map_.end())
|
|
||||||
{
|
|
||||||
LPSECTREE tree = it->second;
|
|
||||||
|
|
||||||
tree->m_neighbor_list.push_back(tree); // 자신을 넣는다.
|
|
||||||
|
|
||||||
SPDLOG_TRACE("{}x{}", (int) tree->m_id.coord.x, (int) tree->m_id.coord.y);
|
|
||||||
|
|
||||||
int x = tree->m_id.coord.x * SECTREE_SIZE;
|
|
||||||
int y = tree->m_id.coord.y * SECTREE_SIZE;
|
|
||||||
|
|
||||||
for (DWORD i = 0; i < NUM_OF_NEIGHBORS; ++i)
|
|
||||||
{
|
|
||||||
LPSECTREE tree2 = Find(x + neighbor_coord[i].x, y + neighbor_coord[i].y);
|
|
||||||
|
|
||||||
if (tree2)
|
|
||||||
{
|
|
||||||
SPDLOG_TRACE(" {} {}x{}", i, (int) tree2->m_id.coord.x, (int) tree2->m_id.coord.y);
|
|
||||||
tree->m_neighbor_list.push_back(tree2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
struct neighbor_coord_s
|
struct neighbor_coord_s
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
@ -181,7 +120,6 @@ void SECTREE_MAP::Build()
|
||||||
|
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTREE_MANAGER::SECTREE_MANAGER()
|
SECTREE_MANAGER::SECTREE_MANAGER()
|
||||||
|
|
|
@ -294,25 +294,7 @@ int CShop::Buy(LPCHARACTER ch, BYTE pos)
|
||||||
DWORD dwTax = 0;
|
DWORD dwTax = 0;
|
||||||
int iVal = 0;
|
int iVal = 0;
|
||||||
|
|
||||||
if (LC_IsYMIR() || LC_IsKorea())
|
|
||||||
{
|
|
||||||
if (0 < (iVal = quest::CQuestManager::instance().GetEventFlag("trade_tax")))
|
|
||||||
{
|
|
||||||
if (iVal > 100)
|
|
||||||
iVal = 100;
|
|
||||||
|
|
||||||
dwTax = dwPrice * iVal / 100;
|
|
||||||
dwPrice = dwPrice - dwTax;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iVal = 3;
|
|
||||||
dwTax = dwPrice * iVal / 100;
|
|
||||||
dwPrice = dwPrice - dwTax;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iVal = quest::CQuestManager::instance().GetEventFlag("personal_shop");
|
iVal = quest::CQuestManager::instance().GetEventFlag("personal_shop");
|
||||||
|
|
||||||
if (0 < iVal)
|
if (0 < iVal)
|
||||||
|
@ -328,7 +310,6 @@ int CShop::Buy(LPCHARACTER ch, BYTE pos)
|
||||||
iVal = 0;
|
iVal = 0;
|
||||||
dwTax = 0;
|
dwTax = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 상점에서 살?? 세금 5%
|
// 상점에서 살?? 세금 5%
|
||||||
if (!m_pkPC)
|
if (!m_pkPC)
|
||||||
|
|
|
@ -218,17 +218,7 @@ int CShopEx::Buy(LPCHARACTER ch, BYTE pos)
|
||||||
if (item)
|
if (item)
|
||||||
SPDLOG_DEBUG("ShopEx: BUY: name {} {}(x {}):{} price {}", ch->GetName(), item->GetName(), item->GetCount(), item->GetID(), dwPrice);
|
SPDLOG_DEBUG("ShopEx: BUY: name {} {}(x {}):{} price {}", ch->GetName(), item->GetName(), item->GetCount(), item->GetID(), dwPrice);
|
||||||
|
|
||||||
if (LC_IsBrazil())
|
|
||||||
{
|
|
||||||
ch->SaveReal();
|
|
||||||
db_clientdesc->DBPacketHeader(HEADER_GD_FLUSH_CACHE, 0, sizeof(DWORD));
|
|
||||||
DWORD pid = ch->GetPlayerID();
|
|
||||||
db_clientdesc->Packet(&pid, sizeof(DWORD));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ch->Save();
|
ch->Save();
|
||||||
}
|
|
||||||
|
|
||||||
return (SHOP_SUBHEADER_GC_OK);
|
return (SHOP_SUBHEADER_GC_OK);
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,16 +317,8 @@ void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount)
|
||||||
DWORD dwTax = 0;
|
DWORD dwTax = 0;
|
||||||
int iVal = 3;
|
int iVal = 3;
|
||||||
|
|
||||||
if (LC_IsYMIR() || LC_IsKorea())
|
|
||||||
{
|
|
||||||
dwTax = dwPrice * iVal / 100;
|
|
||||||
dwPrice -= dwTax;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dwTax = dwPrice * iVal/100;
|
dwTax = dwPrice * iVal/100;
|
||||||
dwPrice -= dwTax;
|
dwPrice -= dwTax;
|
||||||
}
|
|
||||||
|
|
||||||
SPDLOG_TRACE("Sell Item price id {} {} itemid {}", ch->GetPlayerID(), ch->GetName(), item->GetID());
|
SPDLOG_TRACE("Sell Item price id {} {} itemid {}", ch->GetPlayerID(), ch->GetName(), item->GetID());
|
||||||
|
|
||||||
|
@ -349,11 +341,6 @@ void CShopManager::Sell(LPCHARACTER ch, BYTE bCell, BYTE bCount)
|
||||||
|
|
||||||
if (bCount == item->GetCount())
|
if (bCount == item->GetCount())
|
||||||
{
|
{
|
||||||
// 한국에는 아이템을 버리고 복구해달라는 진상유저들이 많아서
|
|
||||||
// 상점 판매시 속성로그를 남긴다.
|
|
||||||
if (LC_IsYMIR())
|
|
||||||
item->AttrLog();
|
|
||||||
|
|
||||||
ITEM_MANAGER::instance().RemoveItem(item, "SELL");
|
ITEM_MANAGER::instance().RemoveItem(item, "SELL");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -57,9 +57,6 @@ inline DWORD CREATE_START_X(BYTE e)
|
||||||
{
|
{
|
||||||
if (1 <= e && e <= 3)
|
if (1 <= e && e <= 3)
|
||||||
{
|
{
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
return g_create_position_canada[e][0];
|
|
||||||
|
|
||||||
return g_create_position[e][0];
|
return g_create_position[e][0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,9 +67,6 @@ inline DWORD CREATE_START_Y(BYTE e)
|
||||||
{
|
{
|
||||||
if (1 <= e && e <= 3)
|
if (1 <= e && e <= 3)
|
||||||
{
|
{
|
||||||
if (LC_IsCanada() == true)
|
|
||||||
return g_create_position_canada[e][1];
|
|
||||||
|
|
||||||
return g_create_position[e][1];
|
return g_create_position[e][1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,24 +269,9 @@ int GetKillValue(int level)
|
||||||
int iMinLevelFor2Point, iMaxLevelFor2Point;
|
int iMinLevelFor2Point, iMaxLevelFor2Point;
|
||||||
int iMinLevelFor3Point, iMaxLevelFor3Point;
|
int iMinLevelFor3Point, iMaxLevelFor3Point;
|
||||||
|
|
||||||
if (LC_IsBrazil() == true)
|
|
||||||
{
|
|
||||||
iMinLevelFor1Point = 35; iMaxLevelFor1Point = 50;
|
|
||||||
iMinLevelFor2Point = 51; iMaxLevelFor2Point = 70;
|
|
||||||
iMinLevelFor3Point = 71; iMaxLevelFor3Point = 99;
|
|
||||||
}
|
|
||||||
else if (LC_IsYMIR() == false)
|
|
||||||
{
|
|
||||||
iMinLevelFor1Point = 30; iMaxLevelFor1Point = 39;
|
|
||||||
iMinLevelFor2Point = 40; iMaxLevelFor2Point = 49;
|
|
||||||
iMinLevelFor3Point = 50; iMaxLevelFor3Point = 99;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
iMinLevelFor1Point = 50; iMaxLevelFor1Point = 59;
|
iMinLevelFor1Point = 50; iMaxLevelFor1Point = 59;
|
||||||
iMinLevelFor2Point = 60; iMaxLevelFor2Point = 69;
|
iMinLevelFor2Point = 60; iMaxLevelFor2Point = 69;
|
||||||
iMinLevelFor3Point = 70; iMaxLevelFor3Point = 99;
|
iMinLevelFor3Point = 70; iMaxLevelFor3Point = 99;
|
||||||
}
|
|
||||||
|
|
||||||
if (iMinLevelFor1Point <= level && level <= iMaxLevelFor1Point)
|
if (iMinLevelFor1Point <= level && level <= iMaxLevelFor1Point)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue