-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Player / Bot player with the last hit #199
Comments
I would say TrinityCore uses loot recipient and loot damage requirement to determine player / group to receive the reward for killing, there is only a small addition to that from bots which is to set loot recepient to master so, unlike with pet, player can loot the creature even if bots do all the damage. For scripted creatures normally after kill actions are handled by using JustDied() hook is creature script, sometimes DamageTaken() if creature doesn't really die, or, in case it's a smart script, probably with SMART_EVENT_DEATH -> SMART_ACTION_SUMMON_GO (I rarely do anything with smart scripts). Alternatively, if you are desperate for a quick fix, you can just force OnCreatureKill() hook using master as killer
|
I will also post that in the trinitycore github, maybe adjust it then so that you don't have to adjust it again and again after each patch |
is this issue belong to "in retail,when players do not cause enough damage, they will not be able to get loot."? |
I played wow retail for almost 9 years. This is not about damage but who makes the last hit. Tried the code snippet and it works very well. The script that I have for my bosses also works perfectly with bots |
At least on 3.3.5 TrinityCore, player / group still needs to deal |
Is it possible to save the equipment in the database or rather not? would be really nice if that were possible, then you no longer have all the equipment in the bank and in the inventory |
Don't mix issues. Thanks. |
sry |
I had a special boss script written for my server. It includes that if you do a certain #daily quest, you can summon a certain boss. So far so good and it works, but when the bot gets the last hit, the quest doesn't complete automatically and no tribute chest appears either.
This only works if I do the kill as a real player, so I have to set the bots to passive so I can do the kill and the quest will complete automatically and the chest with the loot will appear.
In a raid or instance it doesn't matter, I always get loot no matter if the bot does the killing blow or I as a player. The coder just says:
Your core was probably heavily modified in order to allow that to happen. There is no OnCreatureKillCreature hook in the TC ScriptMgr, the only function that we can call once the boss this is OnCreatureKill which takes Player (killer) and creature (killed) as arguments.
There is no OnNPCBotKillCreature hook, and I don't think whoever made the NPCPlayerbots fork added that hook.
The way they handled players being able to loot an NPC killed by the bot was probably done through multiple core modifications.
here when i set the bots passively the chest appears: https://www.youtube.com/watch?v=TkxHrPfcb4s but when i make the bots the killing blow the quest is not completed as expected and no chest appears.
That's why the patch is about bots and you as a player should also have the opportunity to use them when you set self-created bosses into the world, then you should maybe see if you can do something there, regardless of whether the player or bot kills the mob, because you can die as a player in a fight and your bots will then finish the fight and then there should also be loot for custom bosses in the world.
The text was updated successfully, but these errors were encountered: