Opublikowano 11 Grudnia 20241 r Ss: Paczka: Tylko zalogowani Zaloguj się, aby wyświetlić chronioną treść Ten post zawiera treści dostępne tylko dla członków. Zaloguj się lub utwórz konto, aby odblokować całą zawartość tego posta. Zaloguj się Utwórz konto
Opublikowano 12 Grudnia 20241 r Jeśli chodzi o estetykę moim zdaniem średnio to wygląda, już lepiej jakby bg było oryginalnie i obok napisu Ekwipunek ikonka sortowania ale to tylko moja opinia i to kwestia kosmetyczna.
Opublikowano 12 Grudnia 20241 r W dniu 12.12.2024 o 21:00, Tuike napisał(a): Jeśli chodzi o estetykę moim zdaniem średnio to wygląda, już lepiej jakby bg było oryginalnie i obok napisu Ekwipunek ikonka sortowania ale to tylko moja opinia i to kwestia kosmetyczna. aa widze Nerwia style XD
Opublikowano 12 Grudnia 20241 r W dniu 12.12.2024 o 21:07, ARK napisał(a): aa widze Nerwia style XD Ajj nigdy nie grałem na Nerwii chociaż miałem chęć ;d Jakoś taki styl bardziej wydaje mi się estetyczny.
Opublikowano 26 Kwietnia 20251 r W dniu 26.04.2025 o 20:56, WhiteBambo88 napisał(a):Fajny sposób na nieskończone auto potki xDcoś więcej? :o
Opublikowano 27 Kwietnia 20251 r W dniu 26.04.2025 o 23:25, ExoCarossa napisał(a):coś więcej? :oWarunki są tak dobrze napisane, że w przypadku autopotek zużytych prawie do zera przywraca ich wartości do full. W dniu 26.04.2025 o 20:56, WhiteBambo88 napisał(a):Fajny sposób na nieskończone auto potki xDMoże też zbugować wiele innych rzeczy :DWarto też wspomnieć o "wycieku pamięci", który tutaj występuje Edytowane 27 Kwietnia 20251 r przez KoYGeR
Opublikowano 27 Kwietnia 20251 r A no tak, to jest stackowanie w src. Były chyba 3 projekty które tego używałylagi przy stackowaniukopiowanie
Opublikowano 27 Kwietnia 20251 r Teraz powinno nie być kopiowania. Nie sprawdzałem, możecie dać znaćTextKod został skopiowany void CHARACTER::SortInventoryItems(){ if (IsDead() || GetExchange() || GetMyShop() || GetShopOwner() || IsOpenSafebox() || IsCubeOpen()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please close other windows before sorting your inventory.")); return; } int lastSortInventoryPulse = GetSortInventoryPulse(); int iPulse = thecore_pulse(); if (lastSortInventoryPulse > iPulse) { int deltaInSeconds = ((lastSortInventoryPulse / PASSES_PER_SEC(1)) - (iPulse / PASSES_PER_SEC(1))); int minutes = deltaInSeconds / 60; int seconds = (deltaInSeconds - (minutes * 60)); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please wait %d seconds to sort your inventory again."), seconds); return; } static std::vector<LPITEM> v; v.clear(); LPITEM item; int size = INVENTORY_MAX_NUM; SetPosition(POS_FIGHTING); for (int i = 0; i < size; ++i) { if (!(item = GetInventoryItem(i))) continue; v.push_back(item); item->RemoveFromCharacter(); } std::sort(v.begin(), v.end(), [](const LPITEM& a, const LPITEM& b) { return std::string(a->GetName()) < std::string(b->GetName()); }); for (auto& it : v) { if (it) AutoGiveItem(it, false); } SetSortInventoryPulse(thecore_pulse() + PASSES_PER_SEC(10)); SetPosition(POS_STANDING); Save(); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your inventory items have been sorted."));}jeszcze tutajTextKod został skopiowanyvoid CHARACTER::SortInventoryItems(){ int lastSortInventoryPulse = GetSortInventoryPulse(); int iPulse = thecore_pulse(); if (lastSortInventoryPulse > iPulse) { int deltaInSeconds = ((lastSortInventoryPulse / PASSES_PER_SEC(1)) - (iPulse / PASSES_PER_SEC(1))); int minutes = deltaInSeconds / 60; int seconds = (deltaInSeconds - (minutes * 60)); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please wait %d seconds to sort your inventory again."), seconds); return; } if (IsDead() || GetExchange() || GetMyShop() || GetShopOwner() || IsOpenSafebox() || IsCubeOpen()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please close other windows before sorting your inventory.")); return; } SetPosition(POS_FIGHTING); static std::vector<LPITEM> v; v.clear(); LPITEM item; int size = INVENTORY_MAX_NUM; for (int i = 0; i < size; ++i) { if (!(item = GetInventoryItem(i))) continue; v.push_back(item); item->RemoveFromCharacter(); } std::sort(v.begin(), v.end(), [](const LPITEM& a, const LPITEM& b) { return std::string(a->GetName()) < std::string(b->GetName()); }); for (auto& it : v) { if (it) { AutoGiveItem(it, false); } } SetSortInventoryPulse(thecore_pulse() + PASSES_PER_SEC(10)); SetPosition(POS_STANDING); Save(); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your inventory items have been sorted."));} Edytowane 27 Kwietnia 20251 r przez MalikOo
Opublikowano 27 Kwietnia 20251 r W dniu 27.04.2025 o 09:27, MalikOo napisał(a):Teraz powinno nie być kopiowania. Nie sprawdzałem, możecie dać znaćTextKod został skopiowany void CHARACTER::SortInventoryItems(){ if (IsDead() || GetExchange() || GetMyShop() || GetShopOwner() || IsOpenSafebox() || IsCubeOpen()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please close other windows before sorting your inventory.")); return; } int lastSortInventoryPulse = GetSortInventoryPulse(); int iPulse = thecore_pulse(); if (lastSortInventoryPulse > iPulse) { int deltaInSeconds = ((lastSortInventoryPulse / PASSES_PER_SEC(1)) - (iPulse / PASSES_PER_SEC(1))); int minutes = deltaInSeconds / 60; int seconds = (deltaInSeconds - (minutes * 60)); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please wait %d seconds to sort your inventory again."), seconds); return; } static std::vector<LPITEM> v; v.clear(); LPITEM item; int size = INVENTORY_MAX_NUM; SetPosition(POS_FIGHTING); for (int i = 0; i < size; ++i) { if (!(item = GetInventoryItem(i))) continue; v.push_back(item); item->RemoveFromCharacter(); } std::sort(v.begin(), v.end(), [](const LPITEM& a, const LPITEM& b) { return std::string(a->GetName()) < std::string(b->GetName()); }); for (auto& it : v) { if (it) AutoGiveItem(it, false); } SetSortInventoryPulse(thecore_pulse() + PASSES_PER_SEC(10)); SetPosition(POS_STANDING); Save(); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your inventory items have been sorted."));}jeszcze tutajTextKod został skopiowanyvoid CHARACTER::SortInventoryItems(){ int lastSortInventoryPulse = GetSortInventoryPulse(); int iPulse = thecore_pulse(); if (lastSortInventoryPulse > iPulse) { int deltaInSeconds = ((lastSortInventoryPulse / PASSES_PER_SEC(1)) - (iPulse / PASSES_PER_SEC(1))); int minutes = deltaInSeconds / 60; int seconds = (deltaInSeconds - (minutes * 60)); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please wait %d seconds to sort your inventory again."), seconds); return; } if (IsDead() || GetExchange() || GetMyShop() || GetShopOwner() || IsOpenSafebox() || IsCubeOpen()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please close other windows before sorting your inventory.")); return; } SetPosition(POS_FIGHTING); static std::vector<LPITEM> v; v.clear(); LPITEM item; int size = INVENTORY_MAX_NUM; for (int i = 0; i < size; ++i) { if (!(item = GetInventoryItem(i))) continue; v.push_back(item); item->RemoveFromCharacter(); } std::sort(v.begin(), v.end(), [](const LPITEM& a, const LPITEM& b) { return std::string(a->GetName()) < std::string(b->GetName()); }); for (auto& it : v) { if (it) { AutoGiveItem(it, false); } } SetSortInventoryPulse(thecore_pulse() + PASSES_PER_SEC(10)); SetPosition(POS_STANDING); Save(); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your inventory items have been sorted."));}RozwińTeraz trochę dobrych praktyk:C++Kod został skopiowanyvoid CHARACTER::SortInventoryItems(){ const uint32_t& last_inventory_sort_pulse = GetSortInventoryPulse(); const uint32_t& cur_pulse = thecore_pulse(); if (cur_pulse < last_inventory_sort_pulse) { const uint32_t& left_seconds = static_cast<uint32_t>((last_inventory_sort_pulse - cur_pulse) / PASSES_PER_SEC(1)); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please wait %d seconds to sort your inventory again."), left_seconds); return; } if (IsDead() || GetExchange() || GetMyShop() || GetShopOwner() || IsOpenSafebox() || IsCubeOpen()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Please close other windows before sorting your inventory.")); return; } std::vector<LPITEM> v; LPITEM item; for (uint16_t i = 0; i < INVENTORY_MAX_NUM; ++i) { if ((item = GetInventoryItem(i))) { v.push_back(item); item->RemoveFromCharacter(); } } std::sort(v.begin(), v.end(), [](const LPITEM& a, const LPITEM& b) { return std::string(a->GetName()) < std::string(b->GetName()); }); for (auto& it : v) AutoGiveItem(it, false); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Your inventory items have been sorted.")); SetSortInventoryPulse(cur_pulse + PASSES_PER_SEC(10));}
Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto