Jump to content
metin2dev
Metin2International

flexio

Member
  • Content Count

    43
  • Joined

  • Last visited

Community Reputation

12 Good

About flexio

  • Rank
    Neutral

Profile Information

  • Gender
    Not Telling
  • Location
    Czech

Recent Profile Visitors

578 profile views
  1. Whisper fix int CInputMain::Whisper(LPCHARACTER ch, const char * data, size_t uiBytes) { const TPacketCGWhisper* pinfo = reinterpret_cast<const TPacketCGWhisper*>(data); if (uiBytes < pinfo->wSize) return -1; int iExtraLen = pinfo->wSize - sizeof(TPacketCGWhisper); if (iExtraLen < 0) { sys_err("invalid packet length (len %d size %u buffer %u)", iExtraLen, pinfo->wSize, uiBytes); ch->GetDesc()->SetPhase(PHASE_CLOSE); return -1; } if (ch->GetLastPMPulse() < thecore_pulse()) ch->ClearPMCounter(); if (ch->GetPMCounter() > 3 && ch->GetLastPMPulse() > thecore_pulse()) { ch->GetDesc()->SetPhase(PHASE_CLOSE); return -1; } if (ch->FindAffect(AFFECT_BLOCK_CHAT)) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("채팅 금지 상태입니다.")); return (iExtraLen); } LPCHARACTER pkChr = CHARACTER_MANAGER::instance().FindPC(pinfo->szNameTo); if (pkChr == ch) return (iExtraLen); ch->IncreasePMCounter(); ch->SetLastPMPulse(); LPDESC pkDesc = NULL; std::string targetname; BYTE bOpponentEmpire = 0; if (test_server) { if (!pkChr) sys_log(0, "Whisper to %s(%s) from %s", "Null", pinfo->szNameTo, ch->GetName()); else sys_log(0, "Whisper to %s(%s) from %s", pkChr->GetName(), pinfo->szNameTo, ch->GetName()); } if (ch->IsBlockMode(BLOCK_WHISPER)) { if (ch->GetDesc()) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_SENDER_BLOCKED; pack.wSize = sizeof(TPacketGCWhisper); strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->Packet(&pack, sizeof(pack)); } return iExtraLen; } CCI * pkCCI; if (!pkChr) { pkCCI = P2P_MANAGER::instance().Find(pinfo->szNameTo); if (pkCCI) { pkDesc = pkCCI->pkDesc; pkDesc->SetRelay(pinfo->szNameTo); bOpponentEmpire = pkCCI->bEmpire; targetname = pkCCI->szName; if (test_server) sys_log(0, "Whisper to %s from %s (Channel %d Mapindex %d)", "Null", ch->GetName(), pkCCI->bChannel, pkCCI->lMapIndex); } } else { pkDesc = pkChr->GetDesc(); bOpponentEmpire = pkChr->GetEmpire(); targetname = pkChr->GetName(); } if (!pkDesc) { if (ch->GetDesc()) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_NOT_EXIST; pack.wSize = sizeof(TPacketGCWhisper); strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->Packet(&pack, sizeof(TPacketGCWhisper)); sys_log(0, "WHISPER: no player"); } } else { if (ch->IsBlockMode(BLOCK_WHISPER)) { if (ch->GetDesc()) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_SENDER_BLOCKED; pack.wSize = sizeof(TPacketGCWhisper); strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->Packet(&pack, sizeof(pack)); } } else if (pkChr && pkChr->IsBlockMode(BLOCK_WHISPER)) { if (ch->GetDesc()) { TPacketGCWhisper pack; pack.bHeader = HEADER_GC_WHISPER; pack.bType = WHISPER_TYPE_TARGET_BLOCKED; pack.wSize = sizeof(TPacketGCWhisper); strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); ch->GetDesc()->Packet(&pack, sizeof(pack)); } } #ifdef ENABLE_MESSENGER_BLOCK else if ((pkCCI != NULL || pkChr != NULL) && MessengerManager::instance().CheckMessengerList(ch->GetName(), targetname.c_str(), SYST_BLOCK)) { if (ch->GetDesc()) { TPacketGCWhisper pack; char msg_2[CHAT_MAX_LEN + 1]; snprintf(msg_2, sizeof(msg_2), LC_TEXT("%s'yi blokladim"), targetname.c_str()); int len = MIN(CHAT_MAX_LEN, strlen(msg_2) + 1); pack.bHeader = HEADER_GC_WHISPER; pack.wSize = sizeof(TPacketGCWhisper) + len; pack.bType = WHISPER_TYPE_SYSTEM; strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom)); TEMP_BUFFER buf; buf.write(&pack, sizeof(TPacketGCWhisper)); buf.write(msg_2, len); ch->GetDesc()->Packet(buf.read_peek(), buf.size()); } } #endif else
  2. flexio

    open [BUG] Itemshop Ingame

    May be socket index problem. Did you increased sockets? example 3 to 6
  3. flexio

    open problem Announcement refine success

  4. flexio

    open Polymorph P < G10

    Hi, many people says polymorph P is weaker than G10 because P have longer duration. I think it is stupid af and after look into source i have noticed something bad inside return aiPolymorphPowerByLevel[MINMAX(0, GetSkillLevel(SKILL_POLYMORPH), 40)]; Is it just ymir fail? : D
  5. flexio

    solved [BUG] Item_Attr

    `apply` enum('MAX_HP','CON','INT','STR','DEX','ATT_SPEED','CAST_SPEED','HP_REGEN','POISON_PCT','CRITICAL_PCT','PENETRATE_PCT','ATTBONUS_HUMAN','STEAL_HP','BLOCK','DODGE','RESIST_WARRIOR','RESIST_ASSASSIN','RESIST_SURA','RESIST_SHAMAN','RESIST_MAGIC','REFLECT_MELEE','MAGIC_ATT_GRADE','ATT_GRADE_BONUS','IMMUNE_STUN','IMMUNE_SLOW','IMMUNE_FALL') NOT NULL DEFAULT 'MAX_HP', apply value may be different from index in core. find enum EApplyTypes in common/length.h and compare index with item_attr apply EDIT: (slovakia lang) Z apply nic nemazej, názvy představují čísla a ty musí být přesně podle jádra. Například "ATTBONUS_ANIMAL" je číslo 18 v jádru, takže musí být i číslo 18 v item_attr.
  6. flexio

    open problem Announcement refine success

    look twice for (char_item.cpp) ITEM_MANAGER::instance().RemoveItem(item, "REMOVE (REFINE SUCCESS)"); There are inside DoRefineWithScroll and DoRefine
  7. flexio

    open Sash System Exploit (Lennt)

    add "timer" on sash equip effect. "can someone Provide a fix and maybe explain why this problem is existing?" :
  8. flexio

    [SMALL FIX] Taskbar highlight fix Python

    Yea, self.Jeaktivni so complicated
  9. Thanks. Edited your code.
  10. about: Random video with bug : https://youtu.be/zILVyU0YGHU?t=7479 look at the highlight effect of WP sura skills (taskbar) Problem: RefreshQuickSlot spam "ActivateSlot" find: self.selectSkillButtonList = [] under add: self.Jeaktivni = [] find: self.curSkillButton = 0 under add: self.Jeaktivni = 0 find: if constInfo.IS_AUTO_POTION(itemIndex): # metinSocket - [0] : 활성화 여부, [1] : 사용한 양, [2] : 최대 용량 metinSocket = [player.GetItemMetinSocket(window, Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)] if 0 != int(metinSocket[0]): slot.ActivateSlot(slotNumber) else: slot.DeactivateSlot(slotNumber) edit to: if constInfo.IS_AUTO_POTION(itemIndex): # metinSocket - [0] : 활성화 여부, [1] : 사용한 양, [2] : 최대 용량 metinSocket = [player.GetItemMetinSocket(window, Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)] if 0 != int(metinSocket[0]): if not slotNumber in self.Jeaktivni: slot.ActivateSlot(slotNumber) self.Jeaktivni.append(slotNumber) else: slot.DeactivateSlot(slotNumber) if slotNumber in self.Jeaktivni: self.Jeaktivni.remove(slotNumber) else: if slotNumber in self.Jeaktivni: self.Jeaktivni.remove(slotNumber) find: if player.IsSkillActive(Position): slot.ActivateSlot(slotNumber) edit to: if player.IsSkillActive(Position): if not slotNumber in self.Jeaktivni: slot.ActivateSlot(slotNumber) self.Jeaktivni.append(slotNumber) else: if slotNumber in self.Jeaktivni: slot.DeactivateSlot(slotNumber) self.Jeaktivni.remove(slotNumber)
  11. flexio

    c++ Block mob safezone / Move bosses

    But yes, maybe i dont understand your thing. I will make topic when i arrive home. I do not want to argue about small things. Sorry
  12. flexio

    c++ Block mob safezone / Move bosses

    Yes inside onmove, but for idle monster you can fix it inside calculate of move for all monsters. Like " if there is safe zone, dont go there" :D
  13. flexio

    c++ Block mob safezone / Move bosses

    yea but from film.
  14. flexio

    c++ Block mob safezone / Move bosses

    you see now?
×