Opublikowano 21 Maja 202421 Maj Siemano. Przerobiłem bonusy w kd wraz z ich id aby były równo ułożone o 100 od poprzednich Po wszystkim w grze bonusy normalnie widze w itemach ale pod komendą /state jakby gubił bonusy.. Tak jak w tym przykładzie powinienem dostać 50 na woja, 50 na ninje. A dostaje 50 na woja i 50 na sure. Nowe proto wrzucone do clienta, serwer po restarcie Spoiler wpis z item_proto Spoiler 28833 0 Kamień Duszy ( KD ) Kamień Duszy Wojownika+8 10 0 0 1 0 4 16 80000 80000 0 0 0 0 0 0 0 0 59 50 0 0 0 0 0 0 0 0 0 20 -1 -1 -1 -1 -1 -1 0 0 0 28834 0 Kamień Duszy ( KD ) Kamień Duszy Ninja+8 10 0 0 1 0 4 16 80000 80000 0 0 0 0 0 0 0 0 60 50 0 0 0 0 0 0 0 0 0 21 -1 -1 -1 -1 -1 -1 0 0 0 Co dziwniejsze drugi zestaw bronii również nie działa już wgl Spoiler EDIT! Bonusy wszystkie działają ale pod komendą /state nie pokaże nam wartości! Jeżeli chodzi o wyliczenie bonusu jaki posiadamy które poprawnie wylicza: kd witalności kd obony kd uchylenia Reszta jest źle liczona lub w ogółe /state nie bierze ich pod uwage. Edytowane 21 Maja 202421 Maj przez ExoCarossa
Opublikowano 22 Maja 202422 Maj Musisz sprawdzić, czy po dodaniu kamienia duszy dodajesz poprawnie bonus oraz czy ten bonus jest aktywny po zmianie mapy. Na początek dodaj logi, aby sprawdzić, co się tam dzieje. 📂Lokalizacja pliku: 'game -> src -> item.cpp' 🔎Szukaj void CItem::ModifyPoints(bool bAdd) m_pOwner->ApplyPoint(p->aApplies[i].bType, bAdd ? p->aApplies[i].lValue : -p->aApplies[i].lValue); ➕Dodaj m_pOwner->ChatPacket(CHAT_TYPE_INFO, "Applying bonus type: %d, value: %d", p->aApplies[i].bType, applyValue); Po dodaniu tego logu, powinieneś otrzymać informację o tym, jaki typ bonusu dodajesz i jego wartość oraz czy bonus jest aktywny po zmianie mapy.
Opublikowano 22 Maja 202422 Maj Autor 31 minut temu, Sevence napisał(a): Musisz sprawdzić, czy po dodaniu kamienia duszy dodajesz poprawnie bonus oraz czy ten bonus jest aktywny po zmianie mapy. Na początek dodaj logi, aby sprawdzić, co się tam dzieje. 📂Lokalizacja pliku: 'game -> src -> item.cpp' 🔎Szukaj void CItem::ModifyPoints(bool bAdd) m_pOwner->ApplyPoint(p->aApplies[i].bType, bAdd ? p->aApplies[i].lValue : -p->aApplies[i].lValue); ➕Dodaj m_pOwner->ChatPacket(CHAT_TYPE_INFO, "Applying bonus type: %d, value: %d", p->aApplies[i].bType, applyValue); Po dodaniu tego logu, powinieneś otrzymać informację o tym, jaki typ bonusu dodajesz i jego wartość oraz czy bonus jest aktywny po zmianie mapy. 60 to bonus ninji a pod /state wyrzuca sury, po tp bonusy się utrzymują o czym informuje log z game zakladajac bron z kd sury dostaje to; czyli id prawidłowe ALE /state Edytowane 22 Maja 202422 Maj przez ExoCarossa
Opublikowano 22 Maja 202422 Maj Autor 1 minutę temu, Sevence napisał(a): Gdy zmieniasz mapę też masz aktywny? według logów z game tak, pod /state dalej nic nie pokazuje
Opublikowano 22 Maja 202422 Maj Wrócę z pracy to zerknę, co powoduje ten problem, ale bonus masz aktywny w takim razie. Zrób test czy zadajesz większe obrażenia powinien działać. Pewnie tylko state jest jakiś problem.
Opublikowano 22 Maja 202422 Maj Autor Rozwiązanie Teraz, Sevence napisał(a): Wrócę z pracy to zerknę, co powoduje ten problem, ale bonus masz aktywny w takim razie. Zrób test czy zadajesz większe obrażenia powinien działać. Pewnie tylko state jest jakiś problem. Tak, działa bonus po tp i jak i bezpośrednim założeniu przedmiotu po dodaniu kd bez kd: z kd:
Opublikowano 22 Maja 202422 Maj To tylko state nie działa, nie ma się co tym przejmować, ale zobaczę o co chodzi.
Opublikowano 23 Maja 202423 Maj Autor Funkcja state na prośbe @Sevence ACMD(do_state) { char arg1[256]; LPCHARACTER tch; one_argument(argument, arg1, sizeof(arg1)); if (*arg1) { if (arg1[0] == '#') { tch = CHARACTER_MANAGER::instance().Find(strtoul(arg1+1, NULL, 10)); } else { LPDESC d = DESC_MANAGER::instance().FindByCharacterName(arg1); if (!d) tch = NULL; else tch = d->GetCharacter(); } } else tch = ch; if (!tch) return; char buf[256]; snprintf(buf, sizeof(buf), "%s's State: ", tch->GetName()); if (tch->IsPosition(POS_FIGHTING)) strlcat(buf, "Battle", sizeof(buf)); else if (tch->IsPosition(POS_DEAD)) strlcat(buf, "Dead", sizeof(buf)); else strlcat(buf, "Standing", sizeof(buf)); if (ch->GetShop()) strlcat(buf, ", Shop", sizeof(buf)); if (ch->GetExchange()) strlcat(buf, ", Exchange", sizeof(buf)); ch->ChatPacket(CHAT_TYPE_INFO, "%s", buf); int len; len = snprintf(buf, sizeof(buf), "Coordinate %ldx%ld (%ldx%ld)", tch->GetX(), tch->GetY(), tch->GetX() / 100, tch->GetY() / 100); if (len < 0 || len >= (int) sizeof(buf)) len = sizeof(buf) - 1; LPSECTREE pSec = SECTREE_MANAGER::instance().Get(tch->GetMapIndex(), tch->GetX(), tch->GetY()); if (pSec) { TMapSetting& map_setting = SECTREE_MANAGER::instance().GetMap(tch->GetMapIndex())->m_setting; snprintf(buf + len, sizeof(buf) - len, " MapIndex %ld Attribute %08X Local Position (%ld x %ld)", tch->GetMapIndex(), pSec->GetAttribute(tch->GetX(), tch->GetY()), (tch->GetX() - map_setting.iBaseX)/100, (tch->GetY() - map_setting.iBaseY)/100); } ch->ChatPacket(CHAT_TYPE_INFO, "%s", buf); ch->ChatPacket(CHAT_TYPE_INFO, "LEV %d", tch->GetLevel()); ch->ChatPacket(CHAT_TYPE_INFO, "HP %d/%d", tch->GetHP(), tch->GetMaxHP()); ch->ChatPacket(CHAT_TYPE_INFO, "SP %d/%d", tch->GetSP(), tch->GetMaxSP()); ch->ChatPacket(CHAT_TYPE_INFO, "ATT %d MAGIC_ATT %d SPD %d CRIT %d%% PENE %d%% ATT_BONUS %d%%", tch->GetPoint(POINT_ATT_GRADE), tch->GetPoint(POINT_MAGIC_ATT_GRADE), tch->GetPoint(POINT_ATT_SPEED), tch->GetPoint(POINT_CRITICAL_PCT), tch->GetPoint(POINT_PENETRATE_PCT), tch->GetPoint(POINT_ATT_BONUS)); ch->ChatPacket(CHAT_TYPE_INFO, "DEF %d MAGIC_DEF %d BLOCK %d%% DODGE %d%% DEF_BONUS %d%%", tch->GetPoint(POINT_DEF_GRADE), tch->GetPoint(POINT_MAGIC_DEF_GRADE), tch->GetPoint(POINT_BLOCK), tch->GetPoint(POINT_DODGE), tch->GetPoint(POINT_DEF_BONUS)); ch->ChatPacket(CHAT_TYPE_INFO, "RESISTANCES:"); ch->ChatPacket(CHAT_TYPE_INFO, " WARR:%3d%% ASAS:%3d%% SURA:%3d%% SHAM:%3d%%", tch->GetPoint(POINT_RESIST_WARRIOR), tch->GetPoint(POINT_RESIST_ASSASSIN), tch->GetPoint(POINT_RESIST_SURA), tch->GetPoint(POINT_RESIST_SHAMAN)); ch->ChatPacket(CHAT_TYPE_INFO, " SWORD:%3d%% THSWORD:%3d%% DAGGER:%3d%% BELL:%3d%% FAN:%3d%% BOW:%3d%%", tch->GetPoint(POINT_RESIST_SWORD), tch->GetPoint(POINT_RESIST_TWOHAND), tch->GetPoint(POINT_RESIST_DAGGER), tch->GetPoint(POINT_RESIST_BELL), tch->GetPoint(POINT_RESIST_FAN), tch->GetPoint(POINT_RESIST_BOW)); ch->ChatPacket(CHAT_TYPE_INFO, " FIRE:%3d%% ELEC:%3d%% MAGIC:%3d%% WIND:%3d%% CRIT:%3d%% PENE:%3d%%", tch->GetPoint(POINT_RESIST_FIRE), tch->GetPoint(POINT_RESIST_ELEC), tch->GetPoint(POINT_RESIST_MAGIC), tch->GetPoint(POINT_RESIST_WIND), tch->GetPoint(POINT_RESIST_CRITICAL), tch->GetPoint(POINT_RESIST_PENETRATE)); ch->ChatPacket(CHAT_TYPE_INFO, " ICE:%3d%% EARTH:%3d%% DARK:%3d%%", tch->GetPoint(POINT_RESIST_ICE), tch->GetPoint(POINT_RESIST_EARTH), tch->GetPoint(POINT_RESIST_DARK)); ch->ChatPacket(CHAT_TYPE_INFO, "MALL:"); ch->ChatPacket(CHAT_TYPE_INFO, " ATT:%3d%% DEF:%3d%% EXP:%3d%% ITEMx%d GOLDx%d", tch->GetPoint(POINT_MALL_ATTBONUS), tch->GetPoint(POINT_MALL_DEFBONUS), tch->GetPoint(POINT_MALL_EXPBONUS), tch->GetPoint(POINT_MALL_ITEMBONUS) / 10, tch->GetPoint(POINT_MALL_GOLDBONUS) / 10); ch->ChatPacket(CHAT_TYPE_INFO, "BONUS:"); ch->ChatPacket(CHAT_TYPE_INFO, " SKILL:%3d%% NORMAL:%3d%% SKILL_DEF:%3d%% NORMAL_DEF:%3d%%", tch->GetPoint(POINT_SKILL_DAMAGE_BONUS), tch->GetPoint(POINT_NORMAL_HIT_DAMAGE_BONUS), tch->GetPoint(POINT_SKILL_DEFEND_BONUS), tch->GetPoint(POINT_NORMAL_HIT_DEFEND_BONUS)); ch->ChatPacket(CHAT_TYPE_INFO, " HUMAN:%3d%% ANIMAL:%3d%% ORC:%3d%% MILGYO:%3d%% UNDEAD:%3d%%", tch->GetPoint(POINT_ATTBONUS_HUMAN), tch->GetPoint(POINT_ATTBONUS_ANIMAL), tch->GetPoint(POINT_ATTBONUS_ORC), tch->GetPoint(POINT_ATTBONUS_MILGYO), tch->GetPoint(POINT_ATTBONUS_UNDEAD)); ch->ChatPacket(CHAT_TYPE_INFO, " DEVIL:%3d%% INSECT:%3d%% FIRE:%3d%% ICE:%3d%% DESERT:%3d%%", tch->GetPoint(POINT_ATTBONUS_DEVIL), tch->GetPoint(POINT_ATTBONUS_INSECT), tch->GetPoint(POINT_ATTBONUS_FIRE), tch->GetPoint(POINT_ATTBONUS_ICE), tch->GetPoint(POINT_ATTBONUS_DESERT)); ch->ChatPacket(CHAT_TYPE_INFO, " TREE:%3d%% MONSTER:%3d%%", tch->GetPoint(POINT_ATTBONUS_TREE), tch->GetPoint(POINT_ATTBONUS_MONSTER)); ch->ChatPacket(CHAT_TYPE_INFO, " WARR:%3d%% ASAS:%3d%% SURA:%3d%% SHAM:%3d%%", tch->GetPoint(POINT_ATTBONUS_WARRIOR), tch->GetPoint(POINT_ATTBONUS_ASSASSIN), tch->GetPoint(POINT_ATTBONUS_SURA), tch->GetPoint(POINT_ATTBONUS_SHAMAN)); #ifdef ENABLE_NEW_TYPE_BONUSES ch->ChatPacket(CHAT_TYPE_INFO, "NOWE BONUSY:"); ch->ChatPacket(CHAT_TYPE_INFO, " ATT_STONE:%3d%%", tch->GetPoint(POINT_ATTBONUS_STONE)); ch->ChatPacket(CHAT_TYPE_INFO, " ATT_BOSS:%3d%%", tch->GetPoint(POINT_ATTBONUS_BOSS)); ch->ChatPacket(CHAT_TYPE_INFO, " ATT_WLADCY:%3d%%", tch->GetPoint(POINT_ATTBONUS_WLADCY)); ch->ChatPacket(CHAT_TYPE_INFO, " DEF_HUMAN:%3d%%", tch->GetPoint(POINT_RESIST_HUMAN)); ch->ChatPacket(CHAT_TYPE_INFO, " DEF_MONSTER:%3d%%", tch->GetPoint(POINT_RESIST_MONSTER)); ch->ChatPacket(CHAT_TYPE_INFO, " DEF_BOSS:%3d%%", tch->GetPoint(POINT_RESIST_BOSS)); ch->ChatPacket(CHAT_TYPE_INFO, " DEF_WLADCY:%3d%%", tch->GetPoint(POINT_RESIST_WLADCY)); #endif for (int i = 0; i < MAX_PRIV_NUM; ++i) if (CPrivManager::instance().GetPriv(tch, i)) { int iByEmpire = CPrivManager::instance().GetPrivByEmpire(tch->GetEmpire(), i); int iByGuild = 0; if (tch->GetGuild()) iByGuild = CPrivManager::instance().GetPrivByGuild(tch->GetGuild()->GetID(), i); int iByPlayer = CPrivManager::instance().GetPrivByCharacter(tch->GetPlayerID(), i); if (iByEmpire) ch->ChatPacket(CHAT_TYPE_INFO, "%s for empire : %d", LC_TEXT(c_apszPrivNames[i]), iByEmpire); if (iByGuild) ch->ChatPacket(CHAT_TYPE_INFO, "%s for guild : %d", LC_TEXT(c_apszPrivNames[i]), iByGuild); if (iByPlayer) ch->ChatPacket(CHAT_TYPE_INFO, "%s for player : %d", LC_TEXT(c_apszPrivNames[i]), iByPlayer); } }
Opublikowano 23 Maja 202423 Maj Wrzuć jeszcze funkcję CHARACTER::ApplyPoint i z contants.cpp const TApplyInfo aApplyInfo[MAX_APPLY_NUM] i TValueName c_aApplyTypeNames[] =
Opublikowano 23 Maja 202423 Maj Autor 4 minuty temu, Sevence napisał(a): Wrzuć jeszcze funkcję CHARACTER::ApplyPoint i z contants.cpp const TApplyInfo aApplyInfo[MAX_APPLY_NUM] i TValueName c_aApplyTypeNames[] = CHARACTER::ApplyPoint: Spoiler void CHARACTER::ApplyPoint(BYTE bApplyType, int iVal) { switch (bApplyType) { case APPLY_NONE: // 0 break;; case APPLY_CON: PointChange(POINT_HT, iVal); PointChange(POINT_MAX_HP, (iVal * JobInitialPoints[GetJob()].hp_per_ht)); PointChange(POINT_MAX_STAMINA, (iVal * JobInitialPoints[GetJob()].stamina_per_con)); break; case APPLY_INT: PointChange(POINT_IQ, iVal); PointChange(POINT_MAX_SP, (iVal * JobInitialPoints[GetJob()].sp_per_iq)); break; case APPLY_SKILL: // SKILL_DAMAGE_BONUS { // ĂÖ»óŔ§ şńĆ® ±âÁŘŔ¸·Î 8şńĆ® vnum, 9şńĆ® add, 15şńĆ® change // 00000000 00000000 00000000 00000000 // ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ // vnum ^ add change BYTE bSkillVnum = (BYTE) (((DWORD)iVal) >> 24); int iAdd = iVal & 0x00800000; int iChange = iVal & 0x007fffff; sys_log(1, "APPLY_SKILL skill %d add? %d change %d", bSkillVnum, iAdd ? 1 : 0, iChange); if (0 == iAdd) iChange = -iChange; boost::unordered_map<BYTE, int>::iterator iter = m_SkillDamageBonus.find(bSkillVnum); if (iter == m_SkillDamageBonus.end()) m_SkillDamageBonus.insert(std::make_pair(bSkillVnum, iChange)); else iter->second += iChange; } // END_OF_SKILL_DAMAGE_BONUS break; case APPLY_STR: case APPLY_DEX: #ifdef fix_35 case APPLY_MAX_HP: case APPLY_MAX_HP_PCT: { int i = GetMaxHP(); if (i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); } break; case APPLY_MAX_SP: case APPLY_MAX_SP_PCT: { int i = GetMaxSP(); if (i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); } break; #else case APPLY_MAX_HP: case APPLY_MAX_SP: case APPLY_MAX_HP_PCT: case APPLY_MAX_SP_PCT: #endif case APPLY_ATT_SPEED: case APPLY_MOV_SPEED: case APPLY_CAST_SPEED: case APPLY_HP_REGEN: case APPLY_SP_REGEN: case APPLY_POISON_PCT: case APPLY_STUN_PCT: case APPLY_SLOW_PCT: case APPLY_CRITICAL_PCT: case APPLY_PENETRATE_PCT: case APPLY_ATTBONUS_HUMAN: case APPLY_ATTBONUS_ANIMAL: case APPLY_ATTBONUS_ORC: case APPLY_ATTBONUS_MILGYO: case APPLY_ATTBONUS_UNDEAD: case APPLY_ATTBONUS_DEVIL: case APPLY_ATTBONUS_WARRIOR: // 59 case APPLY_ATTBONUS_ASSASSIN: // 60 case APPLY_ATTBONUS_SURA: // 61 case APPLY_ATTBONUS_SHAMAN: // 62 case APPLY_ATTBONUS_MONSTER: // 63 case APPLY_STEAL_HP: case APPLY_STEAL_SP: case APPLY_MANA_BURN_PCT: case APPLY_DAMAGE_SP_RECOVER: case APPLY_BLOCK: case APPLY_DODGE: case APPLY_RESIST_SWORD: case APPLY_RESIST_TWOHAND: case APPLY_RESIST_DAGGER: case APPLY_RESIST_BELL: case APPLY_RESIST_FAN: case APPLY_RESIST_BOW: case APPLY_RESIST_FIRE: case APPLY_RESIST_ELEC: case APPLY_RESIST_MAGIC: case APPLY_RESIST_WIND: case APPLY_RESIST_ICE: case APPLY_RESIST_EARTH: case APPLY_RESIST_DARK: case APPLY_REFLECT_MELEE: case APPLY_REFLECT_CURSE: case APPLY_ANTI_CRITICAL_PCT: case APPLY_ANTI_PENETRATE_PCT: case APPLY_POISON_REDUCE: case APPLY_KILL_SP_RECOVER: case APPLY_EXP_DOUBLE_BONUS: case APPLY_GOLD_DOUBLE_BONUS: case APPLY_ITEM_DROP_BONUS: case APPLY_POTION_BONUS: case APPLY_KILL_HP_RECOVER: case APPLY_IMMUNE_STUN: case APPLY_IMMUNE_SLOW: case APPLY_IMMUNE_FALL: case APPLY_BOW_DISTANCE: case APPLY_ATT_GRADE_BONUS: case APPLY_DEF_GRADE_BONUS: case APPLY_MAGIC_ATT_GRADE: case APPLY_MAGIC_DEF_GRADE: case APPLY_CURSE_PCT: case APPLY_MAX_STAMINA: case APPLY_MALL_ATTBONUS: case APPLY_MALL_DEFBONUS: case APPLY_MALL_EXPBONUS: case APPLY_MALL_ITEMBONUS: case APPLY_MALL_GOLDBONUS: case APPLY_SKILL_DAMAGE_BONUS: case APPLY_NORMAL_HIT_DAMAGE_BONUS: // DEPEND_BONUS_ATTRIBUTES case APPLY_SKILL_DEFEND_BONUS: case APPLY_NORMAL_HIT_DEFEND_BONUS: // END_OF_DEPEND_BONUS_ATTRIBUTES case APPLY_PC_BANG_EXP_BONUS : case APPLY_PC_BANG_DROP_BONUS : case APPLY_RESIST_WARRIOR : case APPLY_RESIST_ASSASSIN : case APPLY_RESIST_SURA : case APPLY_RESIST_SHAMAN : case APPLY_ENERGY: // 82 ±â·Â case APPLY_DEF_GRADE: // 83 ąćľî·Â. DEF_GRADE_BONUS´Â Ŭ¶óżˇĽ µÎąč·Î ş¸ż©Áö´Â ŔǵµµČ ąö±×(...)°ˇ ŔÖ´Ů. case APPLY_COSTUME_ATTR_BONUS: // 84 ÄÚ˝şĆ¬ ľĆŔĚĹŰżˇ şŮŔş ĽÓĽşÄˇ ş¸łĘ˝ş case APPLY_MAGIC_ATTBONUS_PER: // 85 ¸¶ąý °ř°Ý·Â +x% case APPLY_MELEE_MAGIC_ATTBONUS_PER: // 86 ¸¶ąý + ąĐ¸® °ř°Ý·Â +x% #ifdef ENABLE_NEW_TYPE_BONUSES case APPLY_RESIST_HUMAN: // 87 case APPLY_RESIST_MONSTER: // 88 case APPLY_ATTBONUS_STONE: // 89 case APPLY_ATTBONUS_BOSS: // 90 case APPLY_RESIST_BOSS: // 91 case APPLY_ATTBONUS_WLADCY: // 92 case APPLY_RESIST_WLADCY: // 93 #endif PointChange(aApplyInfo[bApplyType].bPointType, iVal); break; default: sys_err("Unknown apply type %d name %s", bApplyType, GetName()); break; } } const TApplyInfo aApplyInfo[MAX_APPLY_NUM] Spoiler const TApplyInfo aApplyInfo[MAX_APPLY_NUM] = /* { DWORD dwPointType; } */ { // Point Type { POINT_NONE, }, // APPLY_NONE, 0 { POINT_MAX_HP, }, // APPLY_MAX_HP, 1 { POINT_MAX_SP, }, // APPLY_MAX_SP, 2 { POINT_HT, }, // APPLY_CON, 3 { POINT_IQ, }, // APPLY_INT, 4 { POINT_ST, }, // APPLY_STR, 5 { POINT_DX, }, // APPLY_DEX, 6 { POINT_ATT_SPEED, }, // APPLY_ATT_SPEED, 7 { POINT_MOV_SPEED, }, // APPLY_MOV_SPEED, 8 { POINT_CASTING_SPEED, }, // APPLY_CAST_SPEED, 9 { POINT_HP_REGEN, }, // APPLY_HP_REGEN, 10 { POINT_SP_REGEN, }, // APPLY_SP_REGEN, 11 { POINT_POISON_PCT, }, // APPLY_POISON_PCT, 12 { POINT_STUN_PCT, }, // APPLY_STUN_PCT, 13 { POINT_SLOW_PCT, }, // APPLY_SLOW_PCT, 14 { POINT_CRITICAL_PCT, }, // APPLY_CRITICAL_PCT, 15 { POINT_PENETRATE_PCT, }, // APPLY_PENETRATE_PCT, 16 { POINT_ATTBONUS_HUMAN, }, // APPLY_ATTBONUS_HUMAN, 17 { POINT_ATTBONUS_ANIMAL, }, // APPLY_ATTBONUS_ANIMAL, 18 { POINT_ATTBONUS_ORC, }, // APPLY_ATTBONUS_ORC, 19 { POINT_ATTBONUS_MILGYO, }, // APPLY_ATTBONUS_MILGYO, 20 { POINT_ATTBONUS_UNDEAD, }, // APPLY_ATTBONUS_UNDEAD, 21 { POINT_ATTBONUS_DEVIL, }, // APPLY_ATTBONUS_DEVIL, 22 { POINT_STEAL_HP, }, // APPLY_STEAL_HP, 23 { POINT_STEAL_SP, }, // APPLY_STEAL_SP, 24 { POINT_MANA_BURN_PCT, }, // APPLY_MANA_BURN_PCT, 25 { POINT_DAMAGE_SP_RECOVER, }, // APPLY_DAMAGE_SP_RECOVER,26 { POINT_BLOCK, }, // APPLY_BLOCK, 27 { POINT_DODGE, }, // APPLY_DODGE, 28 { POINT_RESIST_SWORD, }, // APPLY_RESIST_SWORD, 29 { POINT_RESIST_TWOHAND, }, // APPLY_RESIST_TWOHAND, 30 { POINT_RESIST_DAGGER, }, // APPLY_RESIST_DAGGER, 31 { POINT_RESIST_BELL, }, // APPLY_RESIST_BELL, 32 { POINT_RESIST_FAN, }, // APPLY_RESIST_FAN, 33 { POINT_RESIST_BOW, }, // APPLY_RESIST_BOW, 34 { POINT_RESIST_FIRE, }, // APPLY_RESIST_FIRE, 35 { POINT_RESIST_ELEC, }, // APPLY_RESIST_ELEC, 36 { POINT_RESIST_MAGIC, }, // APPLY_RESIST_MAGIC, 37 { POINT_RESIST_WIND, }, // APPLY_RESIST_WIND, 38 { POINT_REFLECT_MELEE, }, // APPLY_REFLECT_MELEE, 39 { POINT_REFLECT_CURSE, }, // APPLY_REFLECT_CURSE, 40 { POINT_POISON_REDUCE, }, // APPLY_POISON_REDUCE, 41 { POINT_KILL_SP_RECOVER, }, // APPLY_KILL_SP_RECOVER, 42 { POINT_EXP_DOUBLE_BONUS, }, // APPLY_EXP_DOUBLE_BONUS, 43 { POINT_GOLD_DOUBLE_BONUS, }, // APPLY_GOLD_DOUBLE_BONUS,44 { POINT_ITEM_DROP_BONUS, }, // APPLY_ITEM_DROP_BONUS, 45 { POINT_POTION_BONUS, }, // APPLY_POTION_BONUS, 46 { POINT_KILL_HP_RECOVERY, }, // APPLY_KILL_HP_RECOVER, 47 { POINT_IMMUNE_STUN, }, // APPLY_IMMUNE_STUN, 48 { POINT_IMMUNE_SLOW, }, // APPLY_IMMUNE_SLOW, 49 { POINT_IMMUNE_FALL, }, // APPLY_IMMUNE_FALL, 50 { POINT_NONE, }, // APPLY_SKILL, 51 { POINT_BOW_DISTANCE, }, // APPLY_BOW_DISTANCE, 52 { POINT_ATT_GRADE_BONUS, }, // APPLY_ATT_GRADE, 53 { POINT_DEF_GRADE_BONUS, }, // APPLY_DEF_GRADE, 54 { POINT_MAGIC_ATT_GRADE_BONUS, }, // APPLY_MAGIC_ATT_GRADE, 55 { POINT_MAGIC_DEF_GRADE_BONUS, }, // APPLY_MAGIC_DEF_GRADE, 56 { POINT_CURSE_PCT, }, // APPLY_CURSE_PCT, 57 { POINT_MAX_STAMINA }, // APPLY_MAX_STAMINA 58 { POINT_ATTBONUS_WARRIOR }, // APPLY_ATTBONUS_WARRIOR 59 { POINT_ATTBONUS_ASSASSIN }, // APPLY_ATTBONUS_ASSASSIN 60 { POINT_ATTBONUS_SURA }, // APPLY_ATTBONUS_SURA 61 { POINT_ATTBONUS_SHAMAN }, // APPLY_ATTBONUS_SHAMAN 62 { POINT_ATTBONUS_MONSTER }, // APPLY_ATTBONUS_MONSTER 63 { POINT_ATT_BONUS }, // 64 // APPLY_MALL_ATTBONUS { POINT_MALL_DEFBONUS }, // 65 { POINT_MALL_EXPBONUS }, // 66 APPLY_MALL_EXPBONUS { POINT_MALL_ITEMBONUS }, // 67 { POINT_MALL_GOLDBONUS }, // 68 { POINT_MAX_HP_PCT }, // 69 { POINT_MAX_SP_PCT }, // 70 { POINT_SKILL_DAMAGE_BONUS }, // 71 { POINT_NORMAL_HIT_DAMAGE_BONUS }, // 72 // DEFEND_BONUS_ATTRIBUTES { POINT_SKILL_DEFEND_BONUS }, // 73 { POINT_NORMAL_HIT_DEFEND_BONUS }, // 74 // END_OF_DEFEND_BONUS_ATTRIBUTES // PC_BANG_ITEM_ADD { POINT_PC_BANG_EXP_BONUS }, // 75 { POINT_PC_BANG_DROP_BONUS }, // 76 // END_PC_BANG_ITEM_ADD { POINT_NONE, }, // 77 »çżë˝Ă HP ĽŇ¸đ APPLY_EXTRACT_HP_PCT { POINT_RESIST_WARRIOR, }, // 78 ą«»çżˇ°Ô ŔúÇ× APPLY_RESIST_WARRIOR { POINT_RESIST_ASSASSIN, }, // 79 ŔÚ°´żˇ°Ô ŔúÇ× APPLY_RESIST_ASSASSIN { POINT_RESIST_SURA, }, // 80 Ľö¶óżˇ°Ô ŔúÇ× APPLY_RESIST_SURA { POINT_RESIST_SHAMAN, }, // 81 ą«´çżˇ°Ô ŔúÇ× APPLY_RESIST_SHAMAN { POINT_ENERGY }, // 82 ±â·Â { POINT_DEF_GRADE }, // 83 ąćľî·Â. DEF_GRADE_BONUS´Â Ŭ¶óżˇĽ µÎąč·Î ş¸ż©Áö´Â ŔǵµµČ ąö±×(...)°ˇ ŔÖ´Ů. { POINT_COSTUME_ATTR_BONUS }, // 84 ÄÚ˝şĆ¬żˇ şŮŔş ĽÓĽşżˇ ´ëÇŘĽ¸¸ ş¸łĘ˝ş¸¦ ÁÖ´Â ±â·Â { POINT_MAGIC_ATT_BONUS_PER }, // 85 ¸¶ąý °ř°Ý·Â +x% { POINT_MELEE_MAGIC_ATT_BONUS_PER }, // 86 APPLY_MELEE_MAGIC_ATTBONUS_PER { POINT_RESIST_ICE, }, // APPLY_RESIST_ICE, 87 { POINT_RESIST_EARTH, }, // APPLY_RESIST_EARTH, 88 { POINT_RESIST_DARK, }, // APPLY_RESIST_DARK, 89 { POINT_RESIST_CRITICAL, }, // APPLY_ANTI_CRITICAL_PCT, 90 { POINT_RESIST_PENETRATE, }, // APPLY_ANTI_PENETRATE_PCT, 91 #ifdef ENABLE_NEW_TYPE_BONUSES { POINT_RESIST_HUMAN, }, // APPLY_RESIST_HUMAN, // 92 { POINT_RESIST_MONSTER, }, // APPLY_RESIST_MONSTER, // 93 { POINT_ATTBONUS_STONE, }, // APPLY_ATTBONUS_STONE, // 94 { POINT_ATTBONUS_BOSS, }, // APPLY_ATTBONUS_BOSS, // 95 { POINT_RESIST_BOSS, }, // APPLY_RESIST_BOSS, // 96 { POINT_ATTBONUS_WLADCY, }, // APPLY_ATTBONUS_WLADCY, // 97 { POINT_RESIST_WLADCY, }, // APPLY_RESIST_WLADCY, // 98 #endif }; TValueName c_aApplyTypeNames[] = Spoiler TValueName c_aApplyTypeNames[] = { { "STR", APPLY_STR }, { "DEX", APPLY_DEX }, { "CON", APPLY_CON }, { "INT", APPLY_INT }, { "MAX_HP", APPLY_MAX_HP }, { "MAX_SP", APPLY_MAX_SP }, { "MAX_STAMINA", APPLY_MAX_STAMINA }, { "POISON_REDUCE", APPLY_POISON_REDUCE }, { "EXP_DOUBLE_BONUS", APPLY_EXP_DOUBLE_BONUS }, { "GOLD_DOUBLE_BONUS", APPLY_GOLD_DOUBLE_BONUS }, { "ITEM_DROP_BONUS", APPLY_ITEM_DROP_BONUS }, { "HP_REGEN", APPLY_HP_REGEN }, { "SP_REGEN", APPLY_SP_REGEN }, { "ATTACK_SPEED", APPLY_ATT_SPEED }, { "MOVE_SPEED", APPLY_MOV_SPEED }, { "CAST_SPEED", APPLY_CAST_SPEED }, { "ATT_BONUS", APPLY_ATT_GRADE_BONUS }, { "DEF_BONUS", APPLY_DEF_GRADE_BONUS }, { "MAGIC_ATT_GRADE",APPLY_MAGIC_ATT_GRADE }, { "MAGIC_DEF_GRADE",APPLY_MAGIC_DEF_GRADE }, { "SKILL", APPLY_SKILL }, { "ATTBONUS_ANIMAL",APPLY_ATTBONUS_ANIMAL }, { "ATTBONUS_UNDEAD",APPLY_ATTBONUS_UNDEAD }, { "ATTBONUS_DEVIL", APPLY_ATTBONUS_DEVIL }, { "ATTBONUS_HUMAN", APPLY_ATTBONUS_HUMAN }, { "ADD_BOW_DISTANCE",APPLY_BOW_DISTANCE }, { "DODGE", APPLY_DODGE }, { "BLOCK", APPLY_BLOCK }, { "RESIST_SWORD", APPLY_RESIST_SWORD }, { "RESIST_TWOHAND", APPLY_RESIST_TWOHAND }, { "RESIST_DAGGER", APPLY_RESIST_DAGGER }, { "RESIST_BELL", APPLY_RESIST_BELL }, { "RESIST_FAN", APPLY_RESIST_FAN }, { "RESIST_BOW", APPLY_RESIST_BOW }, { "RESIST_FIRE", APPLY_RESIST_FIRE }, { "RESIST_ELEC", APPLY_RESIST_ELEC }, { "RESIST_MAGIC", APPLY_RESIST_MAGIC }, { "RESIST_WIND", APPLY_RESIST_WIND }, { "REFLECT_MELEE", APPLY_REFLECT_MELEE }, { "REFLECT_CURSE", APPLY_REFLECT_CURSE }, { "RESIST_ICE", APPLY_RESIST_ICE }, { "RESIST_EARTH", APPLY_RESIST_EARTH }, { "RESIST_DARK", APPLY_RESIST_DARK }, { "RESIST_CRITICAL", APPLY_ANTI_CRITICAL_PCT }, { "RESIST_PENETRATE", APPLY_ANTI_PENETRATE_PCT }, { "POISON", APPLY_POISON_PCT }, { "SLOW", APPLY_SLOW_PCT }, { "STUN", APPLY_STUN_PCT }, { "STEAL_HP", APPLY_STEAL_HP }, { "STEAL_SP", APPLY_STEAL_SP }, { "MANA_BURN_PCT", APPLY_MANA_BURN_PCT }, { "CRITICAL", APPLY_CRITICAL_PCT }, { "PENETRATE", APPLY_PENETRATE_PCT }, { "KILL_SP_RECOVER",APPLY_KILL_SP_RECOVER }, { "KILL_HP_RECOVER",APPLY_KILL_HP_RECOVER }, { "PENETRATE_PCT", APPLY_PENETRATE_PCT }, { "CRITICAL_PCT", APPLY_CRITICAL_PCT }, { "POISON_PCT", APPLY_POISON_PCT }, { "STUN_PCT", APPLY_STUN_PCT }, { "ATT_BONUS_TO_WARRIOR", APPLY_ATTBONUS_WARRIOR }, { "ATT_BONUS_TO_ASSASSIN", APPLY_ATTBONUS_ASSASSIN }, { "ATT_BONUS_TO_SURA", APPLY_ATTBONUS_SURA }, { "ATT_BONUS_TO_SHAMAN", APPLY_ATTBONUS_SHAMAN }, { "ATT_BONUS_TO_MONSTER", APPLY_ATTBONUS_MONSTER }, { "ATT_BONUS_TO_MOB", APPLY_ATTBONUS_MONSTER }, { "MALL_ATTBONUS", APPLY_MALL_ATTBONUS }, { "MALL_EXPBONUS", APPLY_MALL_EXPBONUS }, { "MALL_DEFBONUS", APPLY_MALL_DEFBONUS }, { "MALL_ITEMBONUS", APPLY_MALL_ITEMBONUS }, { "MALL_GOLDBONUS", APPLY_MALL_GOLDBONUS }, { "MAX_HP_PCT", APPLY_MAX_HP_PCT }, { "MAX_SP_PCT", APPLY_MAX_SP_PCT }, { "SKILL_DAMAGE_BONUS", APPLY_SKILL_DAMAGE_BONUS }, { "NORMAL_HIT_DAMAGE_BONUS",APPLY_NORMAL_HIT_DAMAGE_BONUS }, { "SKILL_DEFEND_BONUS", APPLY_SKILL_DEFEND_BONUS }, { "NORMAL_HIT_DEFEND_BONUS",APPLY_NORMAL_HIT_DEFEND_BONUS }, { "PCBANG_EXP_BONUS", APPLY_PC_BANG_EXP_BONUS }, { "PCBANG_DROP_BONUS", APPLY_PC_BANG_DROP_BONUS }, { "RESIST_WARRIOR", APPLY_RESIST_WARRIOR}, { "RESIST_ASSASSIN", APPLY_RESIST_ASSASSIN}, { "RESIST_SURA", APPLY_RESIST_SURA}, { "RESIST_SHAMAN", APPLY_RESIST_SHAMAN}, // by mhh game/affect.h Á¤ŔǵǾîŔÖŔ˝. INFINITE_AFFECT_DURATION = 0x1FFFFFFF { "INFINITE_AFFECT_DURATION", 0x1FFFFFFF }, { "ENERGY", APPLY_ENERGY }, // ±â·Â { "COSTUME_ATTR_BONUS", APPLY_COSTUME_ATTR_BONUS }, // ±â·Â { "MAGIC_ATTBONUS_PER", APPLY_MAGIC_ATTBONUS_PER }, { "MELEE_MAGIC_ATTBONUS_PER", APPLY_MELEE_MAGIC_ATTBONUS_PER }, #ifdef ENABLE_NEW_TYPE_BONUSES { "RESIST_HUMAN", APPLY_RESIST_HUMAN }, { "RESIST_MONSTER", APPLY_RESIST_MONSTER }, { "ATTBONUS_STONE", APPLY_ATTBONUS_STONE }, { "ATTBONUS_BOSS", APPLY_ATTBONUS_BOSS }, { "RESIST_BOSS", APPLY_RESIST_BOSS }, { "ATTBONUS_WLADCY", APPLY_ATTBONUS_WLADCY }, { "RESIST_WLADCY", APPLY_RESIST_WLADCY }, #endif { NULL, 0 } };
Opublikowano 23 Maja 202423 Maj Trzeba zobaczyć czy problem jest z pobieraniem czy ustawianiem dodaj w getpoint i setpoint logi: sys_log(0, "GetPoint: %s type %d, value %d", GetName(), type, val); W set point warunek zmień tak if (type < POINT_MAX_NUM) { sys_log(0, "SetPoint: %s type %d, value %d", GetName(), type, value); m_pointsInstant.points[type] = value; sys_log(0, "SetPoint: %s type %d, new value %d", GetName(), type, m_pointsInstant.points[type]); }
Siemano.
Przerobiłem bonusy w kd wraz z ich id aby były równo ułożone o 100 od poprzednich
Po wszystkim w grze bonusy normalnie widze w itemach ale pod komendą /state jakby gubił bonusy..
Tak jak w tym przykładzie powinienem dostać 50 na woja, 50 na ninje. A dostaje 50 na woja i 50 na sure.
Nowe proto wrzucone do clienta, serwer po restarcie
wpis z item_proto
28833 0 Kamień Duszy ( KD ) Kamień Duszy Wojownika+8 10 0 0 1 0 4 16 80000 80000 0 0 0 0 0 0 0 0 59 50 0 0 0 0 0 0 0 0 0 20 -1 -1 -1 -1 -1 -1 0 0 0
28834 0 Kamień Duszy ( KD ) Kamień Duszy Ninja+8 10 0 0 1 0 4 16 80000 80000 0 0 0 0 0 0 0 0 60 50 0 0 0 0 0 0 0 0 0 21 -1 -1 -1 -1 -1 -1 0 0 0
Co dziwniejsze drugi zestaw bronii również nie działa już wgl
EDIT!
Bonusy wszystkie działają ale pod komendą /state nie pokaże nam wartości!
Jeżeli chodzi o wyliczenie bonusu jaki posiadamy które poprawnie wylicza:
Reszta jest źle liczona lub w ogółe /state nie bierze ich pod uwage.
Edytowane przez ExoCarossa