Jump to content

Rochet2

getMaNGOS Eluna Developer
  • Content Count

    156
  • Joined

  • Last visited

  • Days Won

    18
  • Donations

    0.00 GBP 

Everything posted by Rochet2

  1. http://www.elunaengine.com/Unit/GetLevel.html At the top of http://www.elunaengine.com/Player/index.html you can see that "Class Player Inherits all methods from: Object, WorldObject, Unit".
  2. What guide are you following? You are not supposed to separately build ACE when using the default config. And it looks like you are trying to build it. Or are you trying to build some other version of ACE and use it instead of the included one? Have you tried with ACE_USE_EXTERNAL set to false, or is there some reason for using external ACE? In a nutshell you simply: download code, download all additional dependencies (cmake, mysql, ..) then run cmake, run make and that is it. Also you have not yet provided which mangos you are trying to compile.
  3. Replacing ACE is not a trivial thing to do. Maybe before trying to do anythig like that it would be better to ask for help with the errors you get with ACE. You should try post the errors you get when trying to compile your core. Also it would be good to post your system information and installed dependency information, such as versions. At the moment we dont know for example what debian you are running, what the errors were, what mangos you are compiling etc.
  4. The suggested fix may work, but it is a hack around the limitations of the send/receive AI event functionality. Instead of casting gameobject to a creature ReceiveAIEvent could be expanded to cover WorldObject as sender. @Gutterboy I would suggest either trying to rework the send/receive AI event system to allow WorldObject as sender or similar, or then we can use this kind of approach: diff --git a/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp b/scripts/eastern_kingdoms/scarlet_enclave/ebon_hold.cpp index 30b970c..f51a194 100644 --- a/scripts/eastern_kingdoms/scarlet_enclave
  5. The problem is that you used Player instead of player. (case sensitive) Player is a global table that contains all player methods. player is the parameter of your Custom_Specialization_Apply function.
  6. Please post the whole code you tried to use.
  7. Rochet2

    global value

    To share data between two files you can also use require mechanic. https://github.com/ElunaLuaEngine/Eluna/blob/master/docs/IMPL_DETAILS.md#script-loading as said in above link, you can use local tbl = require("A") print(tbl[1]) to get a table from a script like: A.lua: return {"Hello world"}
  8. Well, it is not impossible, but it is not intended. The player (or creature etc) can log out or despawn and using the variable would crash or corrupt data without you noticing. Instead you should be storing the guid of the player and each time get the player by guid and check if the return value is nil. If you really want to bend the rules it may be possible to do .. player:SetInvalidation(false) which disables the safety measure for that specific object. That would make you the first one to use it since it was implemented though I believe
  9. Just player. It seems you are using Eluna which is from 2014. Hmm, what core are you using and where did you get it from?
  10. Rochet2

    prevent to say

    Try using return false; http://www.elunaengine.com/Global/RegisterPlayerEvent.html Also note that there is a hook for commands too.
  11. It expects a Player object, not a string. A name is a string. So player, not player:GetName(). Seems the documentation is wrong/outdated for the function too. Says it takes in a number when the error clearly says it takes a Player.
  12. It seems that you have chosen to compile in 32 bit but cmake has chosen 64 bit openssl. Maybe easybuild has a problem or maybe you should clear cmake cache or something like that. Or maybe easybuild allows you to choose the library to use and you must choose 32 bit. In general you should probably always prefer to use 64 bit though as that allows the server to use more ram for example. All dependencies must be 32 bit if you are compiling as 32 bit.
  13. Yes. Functions require you to call them on something. For example if you try to get the nearest player, you need to specify what is the center point of that search. If you wanted to get the nearest player of a creature and you have a creature variable called crea crea:GetNearestPlayer()
  14. No, you write the enchantment slot, which is one of the values I posted. An item can have multiple enchantments on it, so you must specify which one of them you want ( so from which enchant slot )
  15. Wowhead says the spell applies an enchant on the item. So you want to look at enchants the item has. More specifically the temporary enchant, as wowhead says. http://www.elunaengine.com/Item/GetEnchantmentId.html enum EnchantmentSlot : uint16 { PERM_ENCHANTMENT_SLOT = 0, TEMP_ENCHANTMENT_SLOT = 1, SOCK_ENCHANTMENT_SLOT = 2, SOCK_ENCHANTMENT_SLOT_2 = 3, SOCK_ENCHANTMENT_SLOT_3 = 4, BONUS_ENCHANTMENT_SLOT = 5, PRISMATIC_ENCHANTMENT_SLOT = 6, // added at apply special permanent enchantment MAX_INSPECTED_ENCHANTMENT_SLOT = 7, PROP_ENCHANTMENT_SLOT_0 = 7, // used with RandomSuffix PROP_E
  16. You initially asked what the function does. The function simply returns the spellID from item_template (most likely). Seems like this is not what you are after at all. What is it that you want to do? I do not understand what "check spell on item" means. Does it mean that you want to check if the player has some aura when he .. .. equips the item? Does it mean you want to check if an item is able to cast a spell?
  17. I said to look at spell columns. Search for "spell" there are multiple columns, mainly spell_1, spell_2, spell_3..
  18. See the spell columns in item_template:
  19. You mean spell? http://www.elunaengine.com/Player/RemoveSpell.html Depending on what you mean with skill they can also be spells that you can unlearn.
  20. player:GetGUID() does not return a number, it returns an object. To concatenate it to a string you should use tostring(player:GetGUID()) Also using player:GetGUID() is wrong. You should be using player:GetGUIDLow() for any queries into DB with player guid.
  21. The index of the spell, probably 1-5, or possibly starting from 0.
  22. What compiler and what version of it do you use? cend is a part of C++11, so your compiler may not be capable of c++11 and you should probably get a newer version.
  23. You should set the text in DB. You can hack around this by sending packets to the player though as seen here: https://pastebin.com/UDTDF9JD
  24. http://www.elunaengine.com/Player/GossipSendMenu.html The npc_text argument is a number that refers to a row in database that defines what text will show up. If you change the text in database you need to clear client cache to see the changes.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use