Mercurial > mm7
diff GUIWindow.cpp @ 2464:104fdbea0386
cleaning project part 2
author | zipi |
---|---|
date | Sun, 17 Aug 2014 17:49:34 +0100 |
parents | 0f17a30149ec |
children | b054ea5daf45 |
line wrap: on
line diff
--- a/GUIWindow.cpp Sun Aug 17 15:13:18 2014 +0100 +++ b/GUIWindow.cpp Sun Aug 17 17:49:34 2014 +0100 @@ -4,7 +4,7 @@ #define _CRT_SECURE_NO_WARNINGS #include "ErrorHandling.h" -#include "mm7_unsorted_subs.h" + #include "GUIWindow.h" #include "GUIFont.h" #include "Party.h" @@ -3324,3 +3324,701 @@ bountyHunting_text = pNPCTopics[352].pText; } } + +//----- (004B254D) -------------------------------------------------------- +const char * _4B254D_SkillMasteryTeacher(int trainerInfo) +{ + int teacherLevel; // edx@1 + int skillBeingTaught; // ecx@1 + int pClassType; // eax@7 + int currClassMaxMastery; // eax@7 + int pointsInSkillWOutMastery; // ebx@7 + int classBaseId; // eax@8 + unsigned int skillMastery; // eax@29 + unsigned __int16 pointsInSkill; // [sp+1Ch] [bp-10h]@7 + int masteryLevelBeingTaught; // [sp+24h] [bp-8h]@7 + + contract_approved = 0; + teacherLevel = (trainerInfo - 200) % 3; + skillBeingTaught = (trainerInfo - 200) / 3; + Player* activePlayer = pPlayers[uActiveCharacter]; + pClassType = activePlayer->classType; + currClassMaxMastery = byte_4ED970_skill_learn_ability_by_class_table[pClassType][skillBeingTaught]; + masteryLevelBeingTaught = teacherLevel + 2; + dword_F8B1B0_MasteryBeingTaught = masteryLevelBeingTaught; + if (currClassMaxMastery < masteryLevelBeingTaught) + { + classBaseId = pClassType - pClassType % 4; + if (byte_4ED970_skill_learn_ability_by_class_table[classBaseId + 1][skillBeingTaught] >= masteryLevelBeingTaught) + sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[633], pClassNames[classBaseId + 1]);//Вы должны достичь звания %s для обучения этому уровню навыка. You have to be promoted to %s to learn this skill level. + else if (byte_4ED970_skill_learn_ability_by_class_table[classBaseId + 2][skillBeingTaught] >= masteryLevelBeingTaught + && byte_4ED970_skill_learn_ability_by_class_table[classBaseId + 3][skillBeingTaught] >= masteryLevelBeingTaught) + sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[634], pClassNames[classBaseId + 2], pClassNames[classBaseId + 3]);//Вы должны достичь звания %s или %s для обучения этому уровню навыка. You have to be promoted to %s or %s to learn this skill level. + else if (byte_4ED970_skill_learn_ability_by_class_table[classBaseId + 2][skillBeingTaught] >= masteryLevelBeingTaught) + sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[633], pClassNames[classBaseId + 2]);//Вы должны достичь звания %s для обучения этому уровню навыка. You have to be promoted to %s to learn this skill level. + else if (byte_4ED970_skill_learn_ability_by_class_table[classBaseId + 3][skillBeingTaught] >= masteryLevelBeingTaught) + sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[633], pClassNames[classBaseId + 3]);//Вы должны достичь звания %s для обучения этому уровню навыка. You have to be promoted to %s to learn this skill level. + else + sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[632], pClassNames[pClassType]);//Этот уровень навыка не может быть постигнут классом %s. This skill level can not be learned by the %s class. + return pTmpBuf.data(); + } + if (!activePlayer->CanAct()) + return pNPCTopics[122].pText; //Not in your condition! + pointsInSkill = activePlayer->pActiveSkills[skillBeingTaught]; + pointsInSkillWOutMastery = pointsInSkill & 0x3F; + if (!pointsInSkillWOutMastery) + return pNPCTopics[131].pText; //You must know the skill before you can become an expert in it! + skillMastery = SkillToMastery(pointsInSkill); + if ((signed int)skillMastery > teacherLevel + 1) + return pNPCTopics[teacherLevel + 128].pText; // You are already an SKILLLEVEL in this skill. + dword_F8B1AC_award_bit_number = skillBeingTaught; + if (masteryLevelBeingTaught == 2 && pointsInSkillWOutMastery < 4 + || masteryLevelBeingTaught == 3 && pointsInSkillWOutMastery < 7 + || masteryLevelBeingTaught == 4 && pointsInSkillWOutMastery < 10 + ) + return pNPCTopics[127].pText; //"You don't meet the requirements, and cannot be taught until you do." + switch (dword_F8B1AC_award_bit_number) + { + case PLAYER_SKILL_STAFF: + case PLAYER_SKILL_SWORD: + case PLAYER_SKILL_DAGGER: + case PLAYER_SKILL_AXE: + case PLAYER_SKILL_SPEAR: + case PLAYER_SKILL_BOW: + case PLAYER_SKILL_MACE: + case PLAYER_SKILL_ARMSMASTER: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 2000; + break; + case 3: + gold_transaction_amount = 5000; + break; + case 4: + gold_transaction_amount = 8000; + break; + } + break; + case PLAYER_SKILL_BLASTER: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 0; + break; + case 3: + gold_transaction_amount = 0; + break; + case 4: + gold_transaction_amount = 0; + break; + } + break; + case PLAYER_SKILL_SHIELD: + case PLAYER_SKILL_LEATHER: + case PLAYER_SKILL_CHAIN: + case PLAYER_SKILL_PLATE: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 1000; + break; + case 3: + gold_transaction_amount = 3000; + break; + case 4: + gold_transaction_amount = 7000; + break; + } + break; + case PLAYER_SKILL_FIRE: + case PLAYER_SKILL_AIR: + case PLAYER_SKILL_WATER: + case PLAYER_SKILL_EARTH: + case PLAYER_SKILL_SPIRIT: + case PLAYER_SKILL_MIND: + case PLAYER_SKILL_BODY: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 1000; + break; + case 3: + gold_transaction_amount = 4000; + break; + case 4: + gold_transaction_amount = 8000; + break; + } + break; + case PLAYER_SKILL_LIGHT: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 2000; + break; + case 3: + if (!(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 114)) + return pNPCTopics[127].pText; + gold_transaction_amount = 5000; + break; + case 4: + if (!activePlayer->ProfessionOrGuildFlagsCorrect(0x22u, 1) || + !activePlayer->ProfessionOrGuildFlagsCorrect(0x1Au, 1)) + return pNPCTopics[127].pText; + gold_transaction_amount = 8000; + break; + } + break; + case PLAYER_SKILL_DARK: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 2000; + break; + case 3: + if (!(unsigned __int16)_449B57_test_bit(pParty->_quest_bits, 110)) + return pNPCTopics[127].pText; + gold_transaction_amount = 5000; + break; + case 4: + if (!activePlayer->ProfessionOrGuildFlagsCorrect(0x23u, 1) + || !activePlayer->ProfessionOrGuildFlagsCorrect(0x1Bu, 1)) + return pNPCTopics[127].pText; + gold_transaction_amount = 8000; + break; + } + break; + case PLAYER_SKILL_ITEM_ID: + case PLAYER_SKILL_REPAIR: + case PLAYER_SKILL_MEDITATION: + case PLAYER_SKILL_PERCEPTION: + case PLAYER_SKILL_TRAP_DISARM: + case PLAYER_SKILL_MONSTER_ID: + case PLAYER_SKILL_STEALING: + case PLAYER_SKILL_ALCHEMY: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 500; + break; + case 3: + gold_transaction_amount = 2500; + break; + case 4: + gold_transaction_amount = 6000; + break; + } + break; + case PLAYER_SKILL_MERCHANT: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 2000; + break; + case 3: + if (activePlayer->GetBaseWillpower() < 50) + return pNPCTopics[127].pText; + gold_transaction_amount = 5000; + break; + case 4: + gold_transaction_amount = 8000; + break; + } + break; + case PLAYER_SKILL_BODYBUILDING: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 500; + break; + case 3: + if (activePlayer->GetBaseEndurance() < 50) + return pNPCTopics[127].pText; + gold_transaction_amount = 2500; + break; + case 4: + gold_transaction_amount = 6000; + break; + } + break; + case PLAYER_SKILL_DIPLOMACY: + Error("Diplomacy not used"); + break; + case PLAYER_SKILL_TIEVERY: + Error("Thievery not used"); + break; + case PLAYER_SKILL_DODGE: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 2000; + break; + case 3: + gold_transaction_amount = 5000; + break; + case 4: + if ((activePlayer->pActiveSkills[PLAYER_SKILL_UNARMED] & 63) < 0xA) + return pNPCTopics[127].pText; + gold_transaction_amount = 8000; + break; + } + break; + case PLAYER_SKILL_UNARMED: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 2000; + break; + case 3: + gold_transaction_amount = 5000; + break; + case 4: + if ((activePlayer->pActiveSkills[PLAYER_SKILL_DODGE] & 63) < 0xA) + return pNPCTopics[127].pText; + gold_transaction_amount = 8000; + break; + } + break; + case PLAYER_SKILL_LEARNING: + switch (masteryLevelBeingTaught) + { + case 2: + gold_transaction_amount = 2000; + break; + case 3: + if (activePlayer->GetBaseIntelligence() < 50) + return pNPCTopics[127].pText; + gold_transaction_amount = 5000; + break; + case 4: + gold_transaction_amount = 8000; + break; + } + break; + default: + Error("Unknown skill"); + } + if (gold_transaction_amount > pParty->uNumGold) + return pNPCTopics[124].pText; //You don't have enough gold! + contract_approved = 1; + if (masteryLevelBeingTaught == 2) + { + sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[534],//Получить степень ^Pr[%s] в навыке ^Pr[%s] за ^I[%lu] золот^L[ой;ых;ых] + pGlobalTXT_LocalizationStrings[433], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Эксперт + } + else if (masteryLevelBeingTaught == 3) + { + sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[534], + pGlobalTXT_LocalizationStrings[432], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Мастер + } + else if (masteryLevelBeingTaught == 4) + sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[534], + pGlobalTXT_LocalizationStrings[225], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Великий Магистр + return pTmpBuf2.data(); +} + +//----- (00495461) -------------------------------------------------------- +char *BuildDialogueString(const char *lpsz, unsigned __int8 uPlayerID, ItemGen *a3, char *a4, int a5, __int64 *a6) +{ + Player *pPlayer; // ebx@3 + const char *pText; // esi@7 + int v17; // eax@10 + signed __int64 v18; // qax@18 + unsigned __int8 *v20; // ebx@32 + int v21; // ecx@34 + int pReputation; // eax@45 + int v29; // eax@68 + __int16 v55[56]; // [sp+10h] [bp-128h]@34 + stru351_summoned_item v56; // [sp+80h] [bp-B8h]@107 + char a1[100]; // [sp+B8h] [bp-80h]@3 + int v63; // [sp+12Ch] [bp-Ch]@32 + + if (IsBadStringPtrA(lpsz, 1)) + return "Invalid String Passed"; + + a1[0] = 0; + pPlayer = &pParty->pPlayers[uPlayerID]; + memset(pTmpBuf2.data(), 0, sizeof(pTmpBuf2)); + + NPCData *npc = nullptr; + if (dword_5C35D4) + npc = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0))]; //- 1 + else + npc = GetNPCData(sDialogue_SpeakingActorNPC_ID); + + //pText = a4; + uint len = strlen(lpsz); + for (int i = 0, dst = 0; i < len; ++i) + { + char c = lpsz[i]; + if (c != '%') + pTmpBuf2[dst++] = c; + else + { + v17 = 10 * (int)(lpsz[i + 1] - '0') + lpsz[i + 2] - '0'; + + switch (v17) + { + case 1://Подробнее + strcat(pTmpBuf2.data(), npc->pName); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 2: + strcat(pTmpBuf2.data(), pPlayer->pName); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 3: + case 4: + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 5: + v18 = (signed __int64)((double)(signed __int64)pParty->uTimePlayed * 0.234375) / 60 / 60 % 24; + pText = pGlobalTXT_LocalizationStrings[397];// "evening" + if (SHIDWORD(v18) <= 0 && SHIDWORD(v18) >= 0 && (unsigned int)v18 >= 5 && SHIDWORD(v18) <= 0) + { + if (SHIDWORD(v18) >= 0 && (unsigned int)v18 >= 11) + { + if (v18 < 20) + pText = pGlobalTXT_LocalizationStrings[396];// "day" + } + else + { + pText = pGlobalTXT_LocalizationStrings[395];// "morning" + } + } + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 6: + if (pPlayer->uSex) + pText = pGlobalTXT_LocalizationStrings[387];// "lady" + else + pText = pGlobalTXT_LocalizationStrings[385];// "sir" + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 7: + if (pPlayer->uSex) + pText = pGlobalTXT_LocalizationStrings[389];// "Lady" + else + pText = pGlobalTXT_LocalizationStrings[386];// "Sir" + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 8: + v63 = 0; + v20 = (unsigned __int8 *)pPlayer->_achieved_awards_bits; + for (uint _i = 0; _i < 28; ++_i) + { + if ((unsigned __int16)_449B57_test_bit(v20, word_4EE150[i])) + { + v21 = v63; + ++v63; + v55[v63] = word_4EE150[i]; + } + } + if (v63) + { + if (dword_A74CDC == -1) + dword_A74CDC = rand() % v63; + pText = (char *)pAwards[v55[dword_A74CDC]].pText;//(char *)dword_723E80_award_related[2 * v55[v24]]; + } + else + pText = (char *)pNPCTopics[55].pText; + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 9: + if (npc->uSex) + pText = pGlobalTXT_LocalizationStrings[384];// "her" + else + pText = pGlobalTXT_LocalizationStrings[383];// "his" + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 10: + if (pPlayer->uSex) + pText = pGlobalTXT_LocalizationStrings[389];// "Lady" + else + pText = pGlobalTXT_LocalizationStrings[388];// "Lord" + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 11: + pReputation = pParty->GetPartyReputation(); + if (pReputation >= 25) + pText = pGlobalTXT_LocalizationStrings[379]; + else//v25 < 25 + { + if (pReputation < 6) + { + if (pReputation >= -5)//6 >= v25 >= -5 + pText = pGlobalTXT_LocalizationStrings[399]; + else// v25 < -5 + { + if (pReputation < -24)//-24 > v25 + pText = pGlobalTXT_LocalizationStrings[434]; + else// -5 > v25 > -24 + pText = pGlobalTXT_LocalizationStrings[402]; + } + } + else//25 > v25 > 6 + pText = pGlobalTXT_LocalizationStrings[392]; + } + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 12: + pReputation = npc->rep; + if (pReputation >= 25) + pText = pGlobalTXT_LocalizationStrings[379];//Ненавистный + else + { + if (pReputation < 6) + { + if (pReputation >= -5) + pText = pGlobalTXT_LocalizationStrings[399];//Нейтральная + else + { + if (pReputation < -24) + pText = pGlobalTXT_LocalizationStrings[434];//Почтенная + else + pText = pGlobalTXT_LocalizationStrings[402];//Дружелюбный + } + } + else + pText = pGlobalTXT_LocalizationStrings[392];//Недружелюбный + } + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 13: + strcat(pTmpBuf2.data(), pNPCStats->sub_495366_MispronounceName(pPlayer->pName[0], pPlayer->uSex)); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 14: + if (npc->uSex) + pText = pGlobalTXT_LocalizationStrings[391];// "sister" + else + pText = pGlobalTXT_LocalizationStrings[390];// "brother" + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 15: + strcat(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[393]);// "daughter" + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 16: + if (npc->uSex) + pText = pGlobalTXT_LocalizationStrings[391];// "sister" + else + pText = pGlobalTXT_LocalizationStrings[390];// "brother" + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 17://текст наёмного НПС + { + uint pay_percentage = pNPCStats->pProfessions[npc->uProfession].uHirePrice / 100; + if (!pay_percentage) + pay_percentage = 1; + sprintf(a1, "%lu", pay_percentage); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + } + case 18: + case 19: + case 20: + case 21: + case 22: + case 26: + strncpy(a1, lpsz + i + 1, 2); + sprintf(a1, "%lu", atoi(a1)); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 23: + if (pMapStats->GetMapInfo(pCurrentMapName)) + pText = pMapStats->pInfos[pMapStats->GetMapInfo(pCurrentMapName)].pName; + else + pText = pGlobalTXT_LocalizationStrings[394];// "Unknown" + strcat(pTmpBuf2.data(), pText); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 24://название товара в продаже + sprintfex(a1, format_4E2D80, Color16(255, 255, 155), a3->GetDisplayName()); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 25: + v29 = pPlayer->GetBaseBuyingPrice(a3->GetValue(), p2DEvents[(signed int)a4 - 1].fPriceMultiplier); + switch (a5) + { + case 3: + v29 = pPlayer->GetBaseSellingPrice(a3->GetValue(), p2DEvents[(signed int)a4 - 1].fPriceMultiplier); + break; + case 4: + v29 = pPlayer->GetBaseIdentifyPrice(p2DEvents[(signed int)a4 - 1].fPriceMultiplier); + break; + case 5: + v29 = pPlayer->GetBaseRepairPrice(a3->GetValue(), p2DEvents[(signed int)a4 - 1].fPriceMultiplier); + break; + case 6: + v29 = pPlayer->GetBaseSellingPrice(a3->GetValue(), p2DEvents[(signed int)a4 - 1].fPriceMultiplier) / 2; + break; + } + sprintfex(a1, "%lu", v29); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 27://текст продажи + v29 = pPlayer->GetBuyingPrice(a3->GetValue(), p2DEvents[(signed int)a4 - 1].fPriceMultiplier); + if (a5 == 3) + { + v29 = pPlayer->GetPriceSell(a3->GetValue(), p2DEvents[(signed int)a4 - 1].fPriceMultiplier); + if (a3->IsBroken()) + v29 = 1; + sprintfex(a1, "%lu", v29); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + } + if (a5 != 4) + { + if (a5 == 5) + v29 = pPlayer->GetPriceRepair(a3->GetValue(), p2DEvents[(signed int)a4 - 1].fPriceMultiplier); + else + { + if (a5 == 6) + { + v29 = pPlayer->GetPriceSell(a3->GetValue(), p2DEvents[(signed int)a4 - 1].fPriceMultiplier) / 2; + if (a3->IsBroken()) + v29 = 1; + if (!v29) + v29 = 1; + sprintfex(a1, "%lu", v29); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + } + } + sprintfex(a1, "%lu", v29); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + } + sprintfex(a1, "%lu", pPlayer->GetPriceIdentification(p2DEvents[(signed int)a4 - 1].fPriceMultiplier)); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 28://профессия + strcat(pTmpBuf2.data(), (char *)p2DEvents[(signed int)a4 - 1].pProprieterTitle); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 29: + sprintfex(a1, "%lu", pPlayer->GetPriceIdentification(p2DEvents[(signed int)a4 - 1].fPriceMultiplier)); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 30: + if (!a6) + { + strcat(pTmpBuf2.data(), a4); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + } + init_summoned_item(&v56, *a6); + sprintfex(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v56.field_14_exprie_month], v56.field_C_expire_day + 1, v56.field_18_expire_year); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + case 31: + case 32: + case 33: + case 34: + strcat(pTmpBuf2.data(), pParty->pPlayers[v17 - 31].pName); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + default: + if (v17 <= 50 || v17 > 70) + { + strncpy(a1, lpsz + i + 1, 2); + sprintf(a1, "%lu", atoi(a1)); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + } + if (v17 - 51 >= 20) + { + strcat(pTmpBuf2.data(), a4); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + } + init_summoned_item(&v56, pParty->PartyTimes._s_times[v17 - 51]); + sprintfex(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v56.field_14_exprie_month], v56.field_C_expire_day + 1, v56.field_18_expire_year); + strcat(pTmpBuf2.data(), a1); + dst = strlen(pTmpBuf2.data()); + i += 2; + break; + } + } + } + return pTmpBuf2.data(); +} + +//----- (0044C175) -------------------------------------------------------- +void ShowStatusBarString(const char *pString, unsigned int uNumSeconds) +{ + strcpy(GameUI_Footer_TimedString.data(), pString); + GameUI_Footer_TimeLeft = 1000 * uNumSeconds + GetTickCount(); + + for (int i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data()); i > 450; + i = pFontLucida->GetLineWidth(GameUI_Footer_TimedString.data())) + GameUI_Footer_TimedString[strlen(GameUI_Footer_TimedString.data()) - 1] = 0; +} + +//----- (0044C1D0) -------------------------------------------------------- +void ShowNothingHereStatus() +{ + if (!GameUI_Footer_TimeLeft) + ShowStatusBarString(pGlobalTXT_LocalizationStrings[521], 2);// Nothing here +} + +//----- (0044C28B) -------------------------------------------------------- +int const_2() +{ + return 2; +}