127.0.0.1
-
Posts
51 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Forums
Store
Third Party - Providers Directory
Feature Plan
Release Notes
Docs
Events
Posts posted by 127.0.0.1
-
-
- 1
-
40 minutes ago, EnKor said:
i get same error in line 59. So i make the same u say....
This systems it's all bug :\ Cant compile. But ty anywat
error: "
item_block.cpp:61: error: no matching function for call to 'std::multimap<long int, unsigned int,"
Here if fixed :
#include "stdafx.h" #include "item_block.h" #include <fstream> #include <sstream> void CItemBlock::Process() { std::string strMapIndex; std::string strItemVnums; std::ifstream File("blocked_items.txt"); if (!File.is_open()) return; if (!m_map_BlockedItems.empty()) m_map_BlockedItems.clear(); while (!File.eof()) { File >> strMapIndex >> strItemVnums; std::string strItemVnum; std::istringstream Vnums(strItemVnums); while (std::getline(Vnums, strItemVnum, ',')) { AddItem(strtoul(strMapIndex.c_str(), NULL, 10), strtoul(strItemVnum.c_str(), NULL, 10)); } } File.close(); } void CItemBlock::AddItem(const long lMapIndex, const DWORD dwVnum) { if (lMapIndex < 0 || dwVnum < 0) return; m_map_BlockedItems.insert(std::make_pair(lMapIndex, dwVnum)); } void CItemBlock::RemoveItem(const long lMapIndex, const DWORD dwVnum) { if (lMapIndex < 0 || dwVnum < 0) return; BLOCKED_ITEMS::const_iterator it = m_map_BlockedItems.begin(); if (it != m_map_BlockedItems.end()) { if (it->first == lMapIndex && it->second == dwVnum) it = m_map_BlockedItems.erase(it); else ++it; } } bool CItemBlock::CanUseItem(const long lMapIndex, const DWORD dwVnum) const { BLOCKED_ITEMS::const_iterator it = m_map_BlockedItems.begin(); if (it != m_map_BlockedItems.end()) { if (it->first == lMapIndex && it->second == dwVnum) return false; } return true; }
#pragma once class CItemBlock : public singleton<CItemBlock> { public: CItemBlock() { } ~CItemBlock() { } void Process(); bool CanUseItem(const long lMapIndex, const DWORD dwVnum) const; void AddItem(const long lMapIndex, const DWORD dwVnum); void RemoveItem(const long lMapIndex, const DWORD dwVnum); private: typedef std::multimap<long, DWORD> BLOCKED_ITEMS; BLOCKED_ITEMS m_map_BlockedItems; };
- 1
-
I do not think this is possible.
-
44 minutes ago, Thedanielx32 said:
The contest is over? It is valid? When they will be announced the winners
The organizer is banned, so?
-
What a silly question. It's like asking: Who fucked my mother? Only she knows.
Same happens with your problem, where to we know what is in your server?
This issue can have 100 cases? Do you want to make a list of them all? Silly.You do not even bother to tell if you have syserr or to receive any core dump. And you want help ? If you want a good answer, ask a good question. I've learned so on StackOverflow.
-
No one can say what is wrong with this function.
Matter how it is used.This topic should be deleted because you have not given enough information.
def GetAlignmentTitleName(alignment): import chr import player race = player.GetRace() sex = chr.RaceToSex(race) align = player.GetAlignmentData() if align >= 12000: if sex == 1: # Do stuff else: # Do stuff
USE YOU BRAIN WHEN YOU POST A QUESTION. And who is that exygo ?
-
You could use ctypes.c_longlong:
>>> from ctypes import c_longlong as int64_t >>> int64_t(2 ** 63 - 1) c_longlong(9223372036854775807L) >>> int64_t(2 ** 63) c_longlong(-9223372036854775808L) >>> int64_t(2 ** 63).value -9223372036854775808L
Add this import
from ctypes import c_longlong as int64_t
Python usage exmple :
if (int64_t(text) <= 0): return True
-
You want to cast hexadecimal to long long ?
51 minutes ago, Krusty said:..
long long x; std::stringstream ss; ss << std::hex << "0xFFFFFFFFL"; ss >> x; std::cout << static_cast<long long>(x) << std::endl;
http://rextester.com/KYJ25270 Live compile and test.
Will produce the following result :
4294967295
-
3 hours ago, DeYaN. said:
Yes yes yes !!! i do that . i put the old flag in navicat/client ANTIFLAG_MYSHOP - 106880 ! And if i add only that item and click open the shop , the function is working "You can't trade this items!" , but if i add in addition other item who is trade , the shop are working ...
What it should to do is when i try to put an item who is non-trade then to OPEN A WINDOW where is say "you can`t add a non-trade item" ,... no how is now , like after you add items and click "CREATE SHOP" to give a message in the chat "you can`t blalblalba"
https://metin2.download/picture/ZUYSLEQ4g9aNJMp6532vq3v5124I5Akl/.png
- 1
-
51 minutes ago, DeYaN. said:
You don't have brain #confirmed Read my post again.
Think logically. If using the old flag, what should you do?
-
13 minutes ago, iFreakTime~.~ said:
Super easy and worked. Thank you very much.
If it's easy, why have you opened this topic?
-
36 minutes ago, iFreakTime~.~ said:
This is solution ? "player%s_deleted" to "player_deleted%s" ?
Sure, the TablePostfix is used to use 2 database intro same server.
If you set TABLE_POSTFIX = "dev" the player will become player_dev intro mysql.
This is not the correct fix, if you have TABLE_POSTFIX=" " intro CONFIG then player_deleted will become player _delete wtith one space and this will break database.
But if you have the TABLE_POSTFIX="" this is default postfix and this fix is useless.
snprintf(queryStr, sizeof(queryStr), "INSERT INTO player_deleted SELECT * FROM player WHERE id=%d", pi->player_id); std::auto_ptr<SQLMsg> pIns(CDBManager::instance().DirectQuery(queryStr)); if (pIns->Get()->uiAffectedRows == 0 || pIns->Get()->uiAffectedRows == (uint32_t)-1) { sys_log(0, "PLAYER_DELETE FAILED %u CANNOT INSERT TO player_deleted", dwPID); peer->EncodeHeader(HEADER_DG_PLAYER_DELETE_FAILED, pi->dwHandle, 1); peer->EncodeBYTE(pi->account_index); return; }
This is the best solution. Table postfix is shit.
Next use you brain.
- 1
-
25 minutes ago, DeYaN. said:
I belive the antiflag is working , but if i try to open a shop offline and add the non-trade item second time , the items are put in the shop.
I belive i need to put this antiflag in item_proto client ? i put then ,but i don`t upgrade the ItemCSVreader with the new antiflag .
ItemData.h
enum EItemAntiFlag //////////////////////////// ITEM_ANTIFLAG_MY_OFFLINE_SHOP = (1 << 19),
PythonItemModule.cpp
PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_MY_OFFLINE_SHOP", CItemData::ITEM_ANTIFLAG_MY_OFFLINE_SHOP);
Dump_proto.cpp
int get_Item_AntiFlag_Value (string inputString) { string arAntiFlag[] =
Then add in uiofflineshopbuilder.py / uiofflineshop.py those antiflags.
offlineshopbuilder.py
def OnSelectEmptySlot(self, selectedSlotPos):
if item.IsAntiFlag(item.ANTIFLAG_GIVE) or item.IsAntiFlag(item.ITEM_ANTIFLAG_MY_OFFLINE_SHOP): chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OFFLINE_SHOP_CANNOT_SELL_ITEM) return
uiofflineshop.py
def SelectEmptySlot(self, slotIndex):
etc etc... Use you brain.
-
-
42 minutes ago, DeYaN. said:
upp
Show me you enum from item_lenght.h
enum EItemAntiFlag
LOW_WIZARD no GM icon in PM
in Community Support - Questions & Answers
Posted
Search
Add after
if(GetGMLevel() == GM_GOD) { m_afAffectFlag.Set(AFF_YMIR); }