Welcome to AC Web.
Results 1 to 3 of 3
  1. #1

    TrinityCore item_template scriptname error


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Hello! im triying to put a scriptname i did in scriptname column in item_template but item dont load the scriptname also if i put the scriptname in an item that already have a scripname the item continue loading the old scriptname, can someone help me with this please? im very confused :s





    This is the script i did:


    Code:
    class llave_cofre : public ItemScript
    {
    public:
        llave_cofre() : ItemScript("llave_cofre") { }
    
        bool OnUse(Player player, Item item, SpellCastTargets const& /*targets*/)
        {
            uint32 itemId = item->GetEntry();
            uint64 playerGuid = player->GetGUID();
            bool disabled = false;
            
            QueryResult result = CharacterDatabase.PQuery("SELECT `item` FROM `character_inventory` WHERE guid = %u AND item = 34477", playerGuid);
            if (result) 
            {
                player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, NULL);
                return true;
            }
            else
            {
                return false;
            }
        }
    };

  2. #2
    Have you restarted ur server after changing scriptname in db?

  3. #3


    Join Date
    Dec 2010
    Location
    www.TheForgottenCrusade.net
    Posts
    870

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Quote Originally Posted by Malda View Post
    Have you restarted ur server after changing scriptname in db?
    ^ This. and have you recompiled?

 

 

Posting Permissions

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