User Tag List

Page 3 of 8 FirstFirst 1 2 3 4 5 6 7 ... LastLast
Results 15 to 21 of 50

Thread: [CPP] Grumbo'z VIP System

  1. #15
    Emulation Addict
    Join Date
    Feb 2016
    Posts
    44
    XP
    575
    Level
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    git apply grumboz_vip_engine.diff
    grumboz_vip_engine.diff:10: tab in indent.
            PrepareStatement(LOGIN_LOAD_VIP, "SELECT vip, mg, votes FROM account WHERE id = ?", CONNECTION_SYNCH);
    grumboz_vip_engine.diff:11: tab in indent.
            PrepareStatement(LOGIN_SET_VIP, "UPDATE account SET `vip`=? WHERE `id`=?", CONNECTION_ASYNC);
    grumboz_vip_engine.diff:12: tab in indent.
            PrepareStatement(LOGIN_SET_MG, "UPDATE account SET `mg`=? WHERE `id`=?", CONNECTION_ASYNC);
    grumboz_vip_engine.diff:13: tab in indent.
            PrepareStatement(LOGIN_SET_VOTES, "UPDATE account SET `votes`=? WHERE `id`=?", CONNECTION_ASYNC);
    grumboz_vip_engine.diff:24: trailing whitespace.
    
    error: patch failed: src/server/game/Entities/Player/Player.cpp:11129
    error: src/server/game/Entities/Player/Player.cpp: patch does not apply
    This is what I am getting on the last rev of TrinityCore. Any idea how to fix these erros?

  2. #16
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,537
    XP
    20,135,478
    Level
    500
    Thanks
    1,102
    Thanked 337 Times in 217 Posts
    what is the rev you are using?
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  3. #17
    Emulation Addict
    Join Date
    Feb 2016
    Posts
    44
    XP
    575
    Level
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by slp13at420 View Post
    what is the rev you are using?
    Absolutely the last. Just used "git clone -b3.3.5 git://github.com/TrinityCore/TrinityCore.git".

  4. #18
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,537
    XP
    20,135,478
    Level
    500
    Thanks
    1,102
    Thanked 337 Times in 217 Posts
    ok this should edit your player.cpp for the item VIP requiring:
    Code:
    
    diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
    index c9db210..15b2831 100644
    --- a/src/server/game/Entities/Player/Player.cpp
    +++ b/src/server/game/Entities/Player/Player.cpp
    @@ -44,6 +44,7 @@
     #include "GridNotifiersImpl.h"
     #include "Group.h"
     #include "GroupMgr.h"
    +#include "Grumboz_VIP_Core.h"
     #include "Guild.h"
     #include "GuildMgr.h"
     #include "InstanceSaveMgr.h"
    @@ -11160,6 +11161,17 @@ InventoryResult Player::CanEquipNewItem(uint8 slot, uint16 &dest, uint32 item, b
     
     InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool swap, bool not_loading) const
     {
    +	// item VIP level 0 or 1 = all players can equip.
    +	uint32 acctId = GetSession()->GetAccountId();
    +	uint8 Pvip = VIP::GetVIP(acctId);
    +	uint8 Ivip = VIP::GetItemVIP(pItem->GetEntry());
    +
    +	if (Pvip < Ivip)
    +	{
    +		ChatHandler(GetSession()).PSendSysMessage("|cffFF0000You Must be VIP%u or higher to equip this item.|r", Ivip);
    +		return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED;
    +	}
    +	
         dest = 0;
         if (pItem)
         {
    
    all its doing is adding the include and editing an inventory check if player can equip an item.
    Last edited by slp13at420; 03-13-2016 at 10:41 PM.
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  5. #19
    Emulation Addict
    Join Date
    Feb 2016
    Posts
    44
    XP
    575
    Level
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by slp13at420 View Post
    ok this should edit your player.cpp for the item VIP requiring:
    Code:
    
    diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
    index c9db210..15b2831 100644
    --- a/src/server/game/Entities/Player/Player.cpp
    +++ b/src/server/game/Entities/Player/Player.cpp
    @@ -44,6 +44,7 @@
     #include "GridNotifiersImpl.h"
     #include "Group.h"
     #include "GroupMgr.h"
    +#include "Grumboz_VIP_Core.h"
     #include "Guild.h"
     #include "GuildMgr.h"
     #include "InstanceSaveMgr.h"
    @@ -11160,6 +11161,17 @@ InventoryResult Player::CanEquipNewItem(uint8 slot, uint16 &dest, uint32 item, b
     
     InventoryResult Player::CanEquipItem(uint8 slot, uint16 &dest, Item* pItem, bool swap, bool not_loading) const
     {
    +	// item VIP level 0 or 1 = all players can equip.
    +	uint32 acctId = GetSession()->GetAccountId();
    +	uint8 Pvip = VIP::GetVIP(acctId);
    +	uint8 Ivip = VIP::GetItemVIP(pItem->GetEntry());
    +
    +	if (Pvip < Ivip)
    +	{
    +		ChatHandler(GetSession()).PSendSysMessage("|cffFF0000You Must be VIP%u or higher to equip this item.|r", Ivip);
    +		return EQUIP_ERR_ITEM_CANT_BE_EQUIPPED;
    +	}
    +	
         dest = 0;
         if (pItem)
         {
    
    all its doing is adding the include and editing an inventory check if player can equip an item.
    So... I should first execute this, and afterwards the complete .diff? Or how?

  6. #20
    Original Poster
    Mad Scientist <span style='color: #008000'><span class='glow_006400'>slp13at420</span></span>'s Avatar



    Join Date
    Dec 2013
    Location
    Idaho
    Posts
    2,537
    XP
    20,135,478
    Level
    500
    Thanks
    1,102
    Thanked 337 Times in 217 Posts
    I think you can replace line 1082 to 1111 of the diff with that part.
    and it should run clean.

    or it can be run by itself .
    Last edited by slp13at420; 03-13-2016 at 10:51 PM.
    Achievements:
    Shopper Got a Sticky! Member 1 year registered Level XL Level D
    Awards:
    Pot Head LOL Raffle Winner Top Tagger Donator Hangman Scripter Repacker Drunk Support Member of Staff
    "Cuz PvP's better with a bag 'o' weed"
    !! King Spade !!

    -Guild Plot System-
    Grumbo'z Guild Warz


    -VIP System-
    Grumbo'z VIP System

  7. #21
    Emulation Addict
    Join Date
    Feb 2016
    Posts
    44
    XP
    575
    Level
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by slp13at420 View Post
    I think you can replace line 1082 to 1111 of the diff with that part.
    and it should run clean.
    Line 1082 to 1111:
    Code:
    +void AddSC_Grumboz_VIP_Core();
     #endif
     
     void AddScripts()
    @@ -49,5 +50,6 @@ void AddScripts()
         AddPetScripts();
         AddOutdoorPvPScripts();
         AddCustomScripts();
    +	AddSC_Grumboz_VIP_Core();
     #endif
     }
    diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
    index b320a85..b2c8526 100644
    --- a/src/server/worldserver/worldserver.conf.dist
    +++ b/src/server/worldserver/worldserver.conf.dist
    @@ -3572,3 +3572,91 @@ PacketSpoof.BanDuration = 86400
     
     #
     ###################################################################################################
    +###################################################################################################
    +# Grumbo'z VIP System
    +#
    +# These settings provide a flexibility to the system.
    +#
    +# 	
    +#	VIP.MAX
    +#		Description: Max VIP Level for VIP System. max Uint32 value.
    +#		Default:     6
    +#
    +
    Are you sure?

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (1 members and 1 guests)

  1. kusanagy

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •