Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Rochet2

  1. Reminds me of this one quote from subv I keep seeing at times. : )
  2. Take a look at https://en.wikipedia.org/wiki/Precompiled_header PCH is a way to speed up compiling.
  3. It would be best to avoid SQL queries if you can. However as you asked for an example of how to make this query, here is one: #include "DatabaseEnv.h" int64 count = CharacterDatabase.PQuery("SELECT COUNT(*) FROM characters_spells WHERE guid = %u", player->GetGUID().GetCounter())->Fetch()[0].GetInt64(); if (count >= 30) { } In this code - the include allows you to use CharacterDatabase variable, which is a global variable. - PQuery makes a database query and allows you to use printf like syntax to format variables into the SQL. - GetCounter returns the part of the guid that is usually used in DB for players and items to identify them. - Fetch returns the current row from the query result, we call this directly as we know that a result will be returned from this specific SQL. - [0] accesses the first column in the query result. In this case it is the count. - GetInt64() takes the column data and handles it as an int64 value. Most math in SQL is done with bigint, so using uint32 or similar may actually not work on some machines. Always use proper type! - the resulting value is stored into a variable "count" and then compared against 30.
  4. @Verytas Starting over with the source code that matches your client version (7.x) should fix the most imminent issues you have. (follow what I said before) TrinityCore seems to be in the middle of transitioning to 8.x. Guides have not been updated yet and without external tools you cannot use 8.x client yet with TC, so I would not personally recommend trying to use the latest master branch or 8.x clients yet.
  5. @Verytas Seems you are trying to use latest master branch with 7.x client. However master = For 7.3.5 you probably want to go back to the commit that supported that version. For example: git checkout -b 7.3.5 7.3.5/26972 See https://github.com/TrinityCore/TrinityCore/tags and https://git-scm.com/book/en/v2/Git-Basics-Tagging
  6. To print information about closest gameobject you can use .gobject target The information should contain the gameobject's guid. Then you can delete the object by its guid with .gobject delete <guid>
  7. At least I cannot see an edit button on the main page. Other pages seem editable. Main page: Any other page:
  8. The database links are also broken. https://trinitycore.atlassian.net/wiki/spaces/tc/overview?mode=global world database characters database auth database
  9. Hmm, on forum main page right side there is the same topics section twice https://community.trinitycore.org/
  10. Links on the main page of the wiki are also broken in same way: https://trinitycore.atlassian.net/wiki/spaces/tc/overview?mode=global "Description of TrinityCore DBC files contents" "How to add a custom script to your solution" "IRC: #Trinity @ irc.rizon.net (Rules)"
  11. mysql 8 not supported yet: https://github.com/TrinityCore/TrinityCore/issues/22188#issuecomment-407205183 https://trinitycore.atlassian.net/wiki/spaces/tc/pages/10977296/Windows+Requirements
  12. Hmm, why did you add that? I don't think I suggested such at least. The commit/changes I referenced had no mention of such code. https://github.com/TrinityCore/TrinityCore/commit/5734643cecbadfffb7ee1b66c9665d57108923f6#diff-82d123ab4d0745ba8103dc4b10c23d9f If you have 0 experience, maybe trying out the latest version of TC is easier. And if you are already are using the latest version, then you have probably mismatching dependencies or you installed only boost source without the precompiled binaries or similar - for that you should post information about your installation like what boost you have, how does the installation of it look etc. If you really need to try some old unsupported core .. maybe using old versions is an ok choice if you just want to get things working. Less recent boost usually means using a less recent compiler as well if you use the precompiled packages. Cherry-picking is taking only a specific commit/change. You can do that with the command "git cherry-pick <commit>". You can also just do the changes manually. Googling will get you far Hmm, after the other post you made I am not sure what exactly you did or tried. Maybe using the older version of compiler and boost is ok if you can't get anything to work and if they work. To be able to work with the latest tools and libs you would need the changes though.
  13. No. You should cherry-pick the commit I referenced. It should fix your problem with boost (clear cmake cache and retry configure after you cherry picked). Though I guess also using older versions would get rid of the error since it is caused by newer versions, but .. is using old stuff really the solution?
  14. With the boost you have you should be using win64. There was some problems with the new boost versions and the cmake script a while back. Maybe the 6.x core you have has the old cmake script that cannot handle the .1 in the folder name. For this reason I think I temporarily copied my lib64-msvc-14.1 folder and named it lib64-msvc-14.0. But instead of that maybe its better to check if your core has the needed boost cmake changes: https://github.com/TrinityCore/TrinityCore/commit/5734643cecbadfffb7ee1b66c9665d57108923f6#diff-82d123ab4d0745ba8103dc4b10c23d9f .. and now right after writing that I just went there and checked and it doesnt, so maybe cherry pick that commit or something.
  15. Which compiler did you choose in cmake? Did you choose Win64? or the one without it?
  16. Do you have the lib folder(s) with msvc in the name in the boost installation folder?
  17. Usually, if you have boost root set up properly, it can still fail if you are using the boost source instead of precompiled binaries or binaries compiled by yourself. For example, I have everything set up correctly, however when I hide lib64-msvc-14.0 and lib64-msvc-14.1 from my boost installation folder, Cmake will complain with CMake Error at cmake/macros/FindBoost.cmake:1231 (message): Unable to find the requested Boost libraries. Boost version: 1.64.0 Boost include path: C:/local/boost_1_64_0 Could not find the following static Boost libraries: boost_system boost_filesystem boost_thread boost_program_options boost_iostreams boost_regex No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. If you still have problems search on forum for TCE00020. Call Stack (most recent call first): dep/boost/CMakeLists.txt:44 (find_package)
  18. Due to .. relatively new changes .. majority of guides and scripts are now outdated. This happens every now and then since the TC scripting "API" changes to better meet the needs of scripts in the core and sometimes external code. Also currently TC master and 3.3.5 branches have different gossip scripting APIs. While guides and old scripts may be a good way to learn things, they always eventually get outdated if no one maintains them. I think that the most uptodate "documentation" is the code in the core itself. So looking at existing gossip scripts you know what to do. Here is an example of a gossip script: https://github.com/TrinityCore/TrinityCore/blob/f6b6f57a6da909426e3171d09f989c554f20b43d/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp#L53-L108
  19. Hmm, what exactly is the problem? Can you describe it and be more specific?
  20. A small summary: i7-6700K 4GHz 4cores 8threads 5min Ryzen5 1600 3.20GHz 6cores 12threads 5-6min i5-3570K 3.40GHz 4cores 4threads 8min Intel Xeon E3-1231 3.4GHz 4cores 8threads 5min i7-2820 QM 3.4GHz 4cores 8threads 5-6min for building 3.3.5 I was actually expecting a larger difference.. hm. mmap extraction probably shows a lot bigger difference. But guess that isnt as helpful.
  21. What is the problem with accessing the site? Describe the problem you have. Works fine for me: https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130013/World
  22. It seems that this is a common issue suddenly. Every month people post that they have issues regarding the NPC equipment. (not necessarily on these forums..) The issue is often that people seem to convert the item_template to item.dbc. Item_template does not contain all item entries that item.dbc contains. For this reason, replacing the original item.dbc with a generated one will usually lose data which leads to problems. Not all items in the game are accessible to players. This is why not all items have data in item_template. The items that are not available to players may not have damage or other such stats (or we cannot read that data). These items are cosmetic and used by NPCs. Let's say for example that there is some special item like a lantern that guards use. For convenience, the NPC equipment system uses item entries from item.dbc. This lantern may not be available for players since we don't want them to use lanterns, but the displayid and such data must be associated with the entry through item.dbc. What you can do is to add only your edits to the item.dbc or you can extract the data you are missing from item.dbc to DB so that the converter has all the needed information. I think the easiest solution would be to try convert the item.dbc into an SQL which uses INSERT INGORE. That way you can make a copy of your item_template, run the item.dbc sql to it and then generate the dbc file and then delete the DB table that contains the dbc info for extraction purposes.
  23. You should post more information for example what patch you are on, what TC version and so on. Also if this issue does not occur on a clean core and DB then it can be because of some data you have in the database and we may have difficulties reproducing it locally to examine the issue. You could try profiling or debugging to try find out which part exactly is being slow. This can be done for example by simple logging of timestamps between different phases of the functions being called that are slow. Or by using Visual Studio or some other tool that has profiling tools. According to https://www.visualstudio.com/vs/compare/ visual studio community seems to have the profiling tools needed for performance profiling (CPU).
  • Create New...