Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/01/18 in all areas

  1. /// UserInterface -> Packet.h /// Search: SE_EQUIP_RAMADAN_RING, Add below: SE_EQUIP_WELES_RING1, /// UserInterface -> InstanceBase.h /// Search: EFFECT_RAMADAN_RING_EQUIP, Add below: EFFECT_WELES_RING1_EQUIP, /// UserInterface -> PythonCharacterManagerModule.cpp /// Search: PyModule_AddIntConstant(poModule, "EFFECT_RAMADAN_RING_EQUIP", CInstanceBase::EFFECT_RAMADAN_RING_EQUIP); Add below: PyModule_AddIntConstant(poModule, "EFFECT_WELES_RING1_EQUIP", CInstanceBase::EFFECT_WELES_RING1_EQUIP); /// UserInterface -> PythonNetworkStreamPhaseGameItem.cpp /// Search: case SE_EQUIP_RAMADAN_RING: effect = CInstanceBase::EFFECT_RAMADAN_RING_EQUIP; break; Add below: case SE_EQUIP_WELES_RING1: effect = CInstanceBase::EFFECT_WELES_RING1_EQUIP; break; /// game/src -> char_item.cpp /// Search: if (true == CItemVnumHelper::IsRamadanMoonRing(dwVnum)) { this->EffectPacket(SE_EQUIP_RAMADAN_RING); } Add below: else if (true == CItemVnumHelper::IsWELESRing1(dwVnum)) { this->EffectPacket(SE_EQUIP_WELES_RING1); } /// game/src -> item.cpp /// Search: if (true == CItemVnumHelper::IsRamadanMoonRing(GetVnum()) || true == CItemVnumHelper::IsHalloweenCandy(GetVnum()) || true == CItemVnumHelper::IsHappinessRing(GetVnum()) || true == CItemVnumHelper::IsLovePendant(GetVnum())) Add to the function: || true == CItemVnumHelper::IsWELESRing1(GetVnum()) Example: if (true == CItemVnumHelper::IsRamadanMoonRing(GetVnum()) || true == CItemVnumHelper::IsHalloweenCandy(GetVnum()) || true == CItemVnumHelper::IsHappinessRing(GetVnum()) || true == CItemVnumHelper::IsLovePendant(GetVnum()) || true == CItemVnumHelper::IsWELESRing1(GetVnum())) /// common -> leght.h /// Search: SE_EQUIP_RAMADAN_RING, Add below: SE_EQUIP_WELES_RING1, /// common -> VnumHelper.h /// Search: static const bool IsRamadanMoonRing(DWORD vnum) { return 71135 == vnum; } Add below: static const bool IsWELESRing1(DWORD vnum) { return YOUR_ID == vnum; } /// root -> playersettingsmodule.py /// Search: chrmgr.RegisterCacheEffect(chrmgr.EFFECT_RAMADAN_RING_EQUIP, "", "d:/ymir work/effect/etc/buff/buff_item1.mse") Add below: chrmgr.RegisterCacheEffect(chrmgr.EFFECT_WELES_RING1_EQUIP, "", "d:/ymir work/effect/etc/buff/your_effect.mse") /// item_proto /// Type: 16 Subtype: 0 WearFlags: 128
    1 point
  2. Fix Dungeon count monsters: Dungeon.cpp struct FCountMonster { int n; FCountMonster() : n(0) {}; void operator()(LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = (LPCHARACTER) ent; if (ch->IsMonster() || ch->IsStone())//FIX n++; } } }; (Function was keeping also NPC, it could make you ugly problems). Fix Dungeon memory usage: namespace { struct FNotice { FNotice(const char * psz) : m_psz(psz) { } void operator() (LPENTITY ent) { if (ent->IsType(ENTITY_CHARACTER)) { LPCHARACTER ch = (LPCHARACTER) ent; if (ch->IsPC()) //FIX ch->ChatPacket(CHAT_TYPE_NOTICE, "%s", m_psz); } } const char * m_psz; }; } Just 2 errors. I hope that it'll be useful
    1 point
  3. No no, item proto any id and wearflag always this same (128)
    1 point
  4. For minimap: else if (pkInstEach->IsNPC()) { if (pkInstEach->GetRace() == 20135) // if (pkInstEach->IsStructure()) continue; aMarkPosition.m_fX = ( m_fWidth - (float)m_WhiteMark.GetWidth() ) / 2.0f + fDistanceFromCenterX + m_fScreenX; aMarkPosition.m_fY = ( m_fHeight - (float)m_WhiteMark.GetHeight() ) / 2.0f + fDistanceFromCenterY + m_fScreenY; m_NPCPositionVector.push_back(aMarkPosition); } For atlas: // regen.cpp else if (p->m_table.bType == CHAR_TYPE_NPC || p->m_table.bType == CHAR_TYPE_WARP || p->m_table.bType == CHAR_TYPE_GOTO) { if(p->m_table.dwVnum == 20135) continue; SECTREE_MANAGER::instance().InsertNPCPosition(lMapIndex, p->m_table.bType, p->m_table.szLocaleName, (regen->sx+regen->ex) / 2 - base_x, (regen->sy+regen->ey) / 2 - base_y); }
    1 point
  5. Hello, let's start! 1- char_item.cpp Find for double ";;" It's ok for compiler but not good for other things that may happen. 2- On bool CHARACTER::EquipItem(LPITEM item, int iCandidateCell) Find: if (iWearCell < 0) return false; Add below: //FIX BLOCK MARRIAGE ITEMS WHILE RIDING if (iWearCell == WEAR_BODY && IsRiding() && (item->GetVnum() >= 11901 && item->GetVnum() <= 11914)) //Marriage Armors { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("?????????????????????????????")); return false; } if (iWearCell == WEAR_WEAPON && IsRiding() && (item->GetVnum() == 50201)) //Marriage Weapon { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("?????????????????????????????")); return false; } 3- SMALL PREVENTS ON questlua_global.cpp int _clear_server_timer(lua_State* L) { CQuestManager & q = CQuestManager::instance(); const char * name = lua_tostring(L, 1); DWORD arg = (DWORD) lua_tonumber(L, 2); if (name && arg) q.ClearServerTimer(name, arg); else sys_err("LUA PREVENT: Wrong argument on ClearServerTimer!"); return 0; } int _char_log(lua_State * L) { CQuestManager& q = CQuestManager::instance(); LPCHARACTER ch = q.GetCurrentCharacterPtr(); DWORD what = 0; const char* how = ""; const char* hint = ""; if (lua_isnumber(L, 1)) what = (DWORD)lua_tonumber(L, 1); if (lua_isstring(L, 2)) how = lua_tostring(L, 2); if (lua_tostring(L, 3)) hint = lua_tostring(L, 3); if (ch) LogManager::instance().CharLog(ch, what, how, hint); else sys_err("LUA PREVENT: !ch on _char_log!"); return 0; } 4- FIX ISSUE ON WAR: battle.cpp Find: battle_is_attackable Must be like this: if (victim->IsDead() || victim->IsObserverMode()) return false; if (ch->IsStun() || ch->IsDead() || ch->IsObserverMode()) return false; Hope it'll be useful.
    1 point
  6. Hi, this tutorial will solve thist error : [Hidden Content] First of all, the bug happens when the DB tries to set the locale char set, so let's start. Open path_to_your_source/db/src/ClientManager.cpp (in my case /usr/src/mainline_released/Srcs/Sever/db/src and search your country, if you use locale/germany search germany, locale/romania search romania, locale/spain search spain,.. And look for g_stLocale = "latin2";. in my case is latin2 because i use romania, you musn't forgot your charset during the tutorial. Now open main.cpp, and edit: std::string g_stLocale = "euckr"; with your charset, in my case: std::string g_stLocale = "latin2"; Save and exit. Now open, path_to_your_source/libsql/AsyncSQL.cpp ( libsql no libmysql be careful) At line 180 edit: m_stLocale = c_pszLocale; with: m_stLocale = "latin2"; ( in my case latin2, you need to put your charset) And at the end of the file edit: void CAsyncSQL2::SetLocale(const std::string & stLocale) { m_stLocale = stLocale; QueryLocaleSet(); } with: void CAsyncSQL2::SetLocale(const std::string & stLocale) { if(m_stLocale != stLocale) { m_stLocale = stLocale; QueryLocaleSet(); } } Now, compile. In putty or virtualbox put the next commands: cd /path_to_your_source/libsql in my case cd /usr/src/mainline_released/Srcs/Sever/libsql gmake clean gmake After that : cd /path_to_your_source/db/src gmake clean After the clean, open the folder .obj and verify if is empty, if isn't empy, empty it delete all files. After that gmake Now the last step, open navicat connect to your server and on the databases account, common, player, hotbackup and log, right-click->Database properties. Set your character set: latin1, latin2, latin5 And collation: I use general but if you fin your country you can put it. That was all, and sorry for my english.
    1 point
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.