/root/introselect.py
/UserInterface/Locale_inc.h
/UserInterface/Packet.h
//UserInterface/PythonCharacterModule.cpp ???
/UserInterface/PythonNetworkStream.cpp
/UserInterface/PythonNetworkStream.h
/PythonNetworkStreamModule.cpp
/source/common/service.h
/source/common/tables.h
/source/db/src/ClientManagerLogin.cpp
/source/db/src/ClientManagerPlayer.cpp
/source/game/src/char.cpp
//root/INTROSELECT.py
//add
import item
//search
name=net.GetAccountCharacterSlotDataString(index, net.ACCOUNT_CHARACTER_SLOT_NAME)
hair=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_HAIR)
acce=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_ACCE)
//add
weapon=net.GetAccountCharacterSlotDataInteger(index, net.ACCOUNT_CHARACTER_SLOT_WEAPON)
//search
if id:
self.MakeCharacter(index, id, name, race, form, hair, acce)
//replace or adjust
self.MakeCharacter(index, id, name, race, form, hair, acce, weapon)
//search
self.stream.popupWindow.Open(localeInfo.LOGIN_FAILURE_SAMELOGIN, self.ExitSelect, localeInfo.UI_OK)
#self.stream.popupWindow.Open(localeInfo.LOGIN_FAILURE_ALREAY, app.Exit, localeInfo.UI_OK)
def MakeCharacter(self, index, id, name, race, form, hair, acce):
//replace or adjust
def MakeCharacter(self, index, id, name, race, form, hair, acce, weapon):
//search
def MakeCharacter(self, index, id, name, race, form, hair, acce):
chr.SetArmor(form)
chr.SetHair(hair)
chr.SetAcce(acce)
//add
chr.SetWeapon(weapon)
//search and delete
chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
chr.SetLoopMotion(chr.MOTION_INTRO_WAIT)
//add
item.SelectItem(weapon)
itemSubType = item.GetItemSubType()
if weapon == 0:
chr.SetMotionMode(chr.MOTION_MODE_GENERAL)
else:
if itemSubType == item.WEAPON_SWORD:
chr.SetMotionMode(chr.MOTION_MODE_ONEHAND_SWORD)
elif itemSubType == item.WEAPON_DAGGER:
chr.SetMotionMode(chr.MOTION_MODE_DUALHAND_SWORD)
elif itemSubType == item.WEAPON_BOW:
chr.SetMotionMode(chr.MOTION_MODE_BOW)
elif itemSubType == item.WEAPON_TWO_HANDED:
chr.SetMotionMode(chr.MOTION_MODE_TWOHAND_SWORD)
elif itemSubType == item.WEAPON_BELL:
chr.SetMotionMode(chr.MOTION_MODE_BELL)
elif itemSubType == item.WEAPON_FAN:
chr.SetMotionMode(chr.MOTION_MODE_FAN)
chr.SetLoopMotion(chr.MOTION_WAIT)
//LOCALE_INC.h
//add
#define ENABLE_CHARACTER_RENEWAL
//PACKET.h
//search
typedef struct SSimplePlayerInformation
BYTE bChangeName;
WORD wHairPart;
DWORD dwAccePart;
//add
#ifdef ENABLE_CHARACTER_RENEWAL
WORD wWeaponPart;
#endif
//PythonNetworkStream.cpp
//search
UINT CPythonNetworkStream::GetAccountCharacterSlotDatau(UINT iSlot, UINT eType)
return rkSimplePlayerInfo.wHairPart;
case ACCOUNT_CHARACTER_SLOT_ACCE:
return rkSimplePlayerInfo.wAccePart;
//add
#ifdef ENABLE_CHARACTER_RENEWAL
case ACCOUNT_CHARACTER_SLOT_WEAPON:
return rkSimplePlayerInfo.wWeaponPart;
break;
#endif
//PythonNetworkStream.h
//search
class CPythonNetworkStream : public CNetworkStream, public CSingleton<CPythonNet
ACCOUNT_CHARACTER_SLOT_CHANGE_NAME_FLAG,
ACCOUNT_CHARACTER_SLOT_HAIR,
ACCOUNT_CHARACTER_SLOT_ACCE,
//add
#ifdef ENABLE_CHARACTER_RENEWAL
ACCOUNT_CHARACTER_SLOT_WEAPON,
#endif
//PythonNetworkStreamModule.cpp
//search
void initnet()
PyModule_AddIntConstant(poModule, "ACCOUNT_CHARACTER_SLOT_CHANGE_NAME_FLAG", CPythonNetworkStream::ACCOUNT_CHARACTER_SLOT_CHANGE_NAME_FLAG);
PyModule_AddIntConstant(poModule, "ACCOUNT_CHARACTER_SLOT_HAIR", CPythonNetworkStream::ACCOUNT_CHARACTER_SLOT_HAIR);
PyModule_AddIntConstant(poModule, "ACCOUNT_CHARACTER_SLOT_ACCE", CPythonNetworkStream::ACCOUNT_CHARACTER_SLOT_ACCE);
//add
#ifdef ENABLE_CHARACTER_RENEWAL
PyModule_AddIntConstant(poModule, "ACCOUNT_CHARACTER_SLOT_WEAPON", CPythonNetworkStream::ACCOUNT_CHARACTER_SLOT_WEAPON);
#endif
//service.h
//add
#define ENABLE_CHARACTER_RENEWAL
//tables.h
//search
typedef struct SSimplePlayer
BYTE bChangeName;
WORD wHairPart;
DWORD dwAccePart;
//add)
#ifdef ENABLE_CHARACTER_RENEWAL
WORD wWeaponPart;
#endif
//ClientManagerLogin.cpp
//search
void CClientManager::RESULT_LOGIN_BY_KEY(CPeer * peer, SQLMsg * msg)
{
...
}
extern std::string g_stLocale;
if (g_stLocale == "gb2312")
{
snprintf(szQuery, sizeof(szQuery),
//add *2x !!!
#ifdef ENABLE_CHARACTER_RENEWAL
"SELECT id, name, job, level, alignment, st, ht, dx, iq, part_main, part_hair, part_acce, part_weapon, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",
#else
"SELECT id, name, job, level, alignment, st, ht, dx, iq, part_main, part_hair, part_acce, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",
#endif
//search
void CreateAccountPlayerDataFromRes(MYSQL_RES * pRes, TAccountTable * pkTab)
pkTab->players[j].wMainPart = pt->parts[PART_MAIN];
pkTab->players[j].wHairPart = pt->parts[PART_HAIR];
pkTab->players[j].dwAccePart = pt->parts[PART_ACCE];
//add
#ifdef ENABLE_CHARACTER_RENEWAL
pkTab->players[j].wWeaponPart = pt->parts[PART_WEAPON];
#endif
//search
void CClientManager::RESULT_LOGIN(CPeer * peer, SQLMsg * msg)
{
...
}
char queryStr[512];
extern std::string g_stLocale;
if (g_stLocale == "gb2312")
{
snprintf(queryStr, sizeof(queryStr)
//add *2x !!!
#ifdef ENABLE_CHARACTER_RENEWAL
"SELECT id, name, job, level, alignment, st, ht, dx, iq, part_main, part_hair, part_acce, part_weapon, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",
#else
"SELECT id, name, job, level, alignment, st, ht, dx, iq, part_main, part_hair, part_acce, x, y, skill_group, change_name FROM player%s WHERE account_id=%u",
#endif
//search
void CreateAccountPlayerDataFromRes(MYSQL_RES * pRes, TAccountTable * pkTab)
pkTab->players[j].wMainPart = 0;
pkTab->players[j].wHairPart = 0;
pkTab->players[j].dwAccePart = 0;
//add
#ifdef ENABLE_CHARACTER_RENEWAL
pkTab->players[j].wWeaponPart = 0;
#endif
//search
void CreateAccountPlayerDataFromRes(MYSQL_RES * pRes, TAccountTable * pkTab)
str_to_number(pkTab->players[j].wMainPart, row[col++]);
str_to_number(pkTab->players[j].wHairPart, row[col++]);
str_to_number(pkTab->players[j].dwAccePart, row[col++]);
//add
#ifdef ENABLE_CHARACTER_RENEWAL
str_to_number(pkTab->players[j].wWeaponPart, row[col++]);
#endif
//ClientManagerPlayer.cpp
//search
size_t CreatePlayerSaveQuery(char * pszQuery, size_t querySize, TPlayerTable * p
"part_main = %d, "
"part_hair = %d, "
"part_acce = %d, "
//add
#ifdef ENABLE_CHARACTER_RENEWAL
"part_weapon = %d, "
#endif
//search
size_t CreatePlayerSaveQuery(char * pszQuery, size_t querySize, TPlayerTable * p
pkTab->parts[PART_MAIN],
pkTab->parts[PART_HAIR],
pkTab->parts[PART_ACCE],
//add
#ifdef ENABLE_CHARACTER_RENEWAL
pkTab->parts[PART_WEAPON],
#endif
//search
void CClientManager::QUERY_PLAYER_LOAD(CPeer * peer, DWORD dwHandle, TPlayerLoad
"gold,level,level_step,st,ht,dx,iq,exp,"
"stat_point,skill_point,sub_skill_point,stat_reset_count,part_base,part_hair,"
"part_acce,"
//add
#ifdef ENABLE_CHARACTER_RENEWAL
"part_weapon,"
#endif
//search
bool CreatePlayerTableFromRes(MYSQL_RES * res, TPlayerTable * pkTab)
str_to_number(pkTab->part_base, row[col++]);
str_to_number(pkTab->parts[PART_HAIR], row[col++]);
str_to_number(pkTab->parts[PART_ACCE], row[col++]);
//add
#ifdef ENABLE_CHARACTER_RENEWAL
str_to_number(pkTab->parts[PART_WEAPON], row[col++]);
#endif
//search
void CClientManager::__QUERY_PLAYER_CREATE(CPeer *peer, DWORD dwHandle, TPlayerC
"part_main, "
"part_hair, "
"part_acce, "
//add
#ifdef ENABLE_CHARACTER_RENEWAL
"part_weapon, "
#endif
//search
void CClientManager::__QUERY_PLAYER_CREATE(CPeer *peer, DWORD dwHandle, TPlayerC
"%d, "
"%d, "
"%d, "
//add
#ifdef ENABLE_CHARACTER_RENEWAL
"%d, "
#endif
// "0, "
// "%lld, "
// "0, "
// ->like this
// queryLen = snprintf(queryStr, sizeof(queryStr),
// "INSERT INTO player%s "
// "(id, account_id, name, level, st, ht, dx, iq, "
// "job, voice, dir, x, y, z, "
// "hp, mp, random_hp, random_sp, stat_point, stamina, part_base, part_main, part_hair, part_acce,"
// #ifdef ENABLE_CHARACTER_RENEWAL
// "part_weapon, "
// #endif
// "gold, playtime, "
// "skill_level, quickslot) "
// "VALUES(0, %u, '%s', %d, %d, %d, %d, %d, "
// "%d, %d, %d, %d, %d, %d, %d, "
// "%d, %d, %d, %d, %d, %d, %d, %d, "
// #ifdef ENABLE_CHARACTER_RENEWAL
// "%d,"
// #endif
// "0, %d, 0, ",
//////////////////////////////////////
//search
void CClientManager::__QUERY_PLAYER_CREATE(CPeer *peer, DWORD dwHandle, TPlayerC
packet->player_table.part_base,
packet->player_table.part_base,
packet->player_table.part_base,
//add
#ifdef ENABLE_CHARACTER_RENEWAL
packet->player_table.part_base,
#endif
// ->like this
// GetTablePostfix(),
// packet->account_id, packet->player_table.name, packet->player_table.level, packet->player_table.st, packet->player_table.ht, packet->player_table.dx, packet->player_table.iq,
// packet->player_table.job, packet->player_table.voice, packet->player_table.dir, packet->player_table.x, packet->player_table.y, packet->player_table.z,
// packet->player_table.hp, packet->player_table.sp, packet->player_table.sRandomHP, packet->player_table.sRandomSP, packet->player_table.stat_point, packet->player_table.stamina, packet->player_table.part_base, packet->player_table.part_base,
// #ifdef ENABLE_CHARACTER_RENEWAL
// packet->player_table.part_base,
// #endif
// packet->player_table.gold);
/////////////////////////////////
//char.cpp
//search
void CHARACTER::SetPlayerProto(const TPlayerTable * t)
m_pointsInstant.bBasePart = t->part_base;
SetPart(PART_HAIR, t->parts[PART_HAIR]);
SetPart(PART_ACCE, t->parts[PART_ACCE]);
//add
#ifdef ENABLE_CHARACTER_RENEWAL
SetPart(PART_WEAPON, t->parts[PART_WEAPON]);
#endif
// MYSQL
//edit player table with partWeapon