View Full Version : TrinityCore 3.3.5 Don't allow access to BG/Arena if player has item equipped
07-19-2016, 02:46 AM
Well, as the title says...
I wanna block the access to arena or bg (Clicking on the button "enter to the bg/arena") if the player has equipped an item specified before in an array or similar.
Or if u have in mind something similar as that I want, I'll appreciate your ideas.
I really really want to block the player access if (s)he has that item.
Thanks a lot!
PS: Player clicks the button and appears an alert "You can't access to bg if you have VIP items".
07-19-2016, 12:20 PM
Just flag the items. 67108864 will not allow the player to use the item in arena. (you can try creating your own flag)
I think you can mess around with Disables in your database too.
If none of that works you have to go to BattleGround.cpp and disable it manually with c++
07-19-2016, 07:36 PM
It doesn't work. The flags aren't working...
How i disable it manually from Battleground.cpp?
And what about if a player has the item equipped before (s)he clicks "Join to War" ??
07-19-2016, 08:27 PM
I did it.
No one can enter if (s)he has X item equipped. But if it is true, then the BG announce "Join to war" disappear...
I wanna do something like when you fall down "You can't do this while you're falling down or flying", the button "Join to War" doesn't work but the announce don't disappear.
How can i do it?
07-20-2016, 12:51 PM
I have no idea as im not that into c++ and similarities.
with c++ you can do this, but i do not know how sorry.
Glad you got the other stuff figured out.
07-20-2016, 06:43 PM
No prob bro, I did it and it works.
In BattlegroundHandler.cpp inside:
void WorldSession::HandleBattleFieldPortOpcode(WorldPac ket &recvData)
I can play with those buttons. Thanks anyway.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.