Show
Ignore:
Timestamp:
11/19/08 13:24:39 (17 years ago)
Author:
yumileroy
Message:

[svn] * Updated to 6743 and 685

Moved language id used by Arena to a higher place to solve conflicts
Added the empty script folders

Original author: Neo2003
Date: 2008-10-09 08:42:22-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/ObjectMgr.cpp

    r18 r28  
    66806680    m_mCacheTrainerSpellMap.clear(); 
    66816681 
     6682    std::set<uint32> skip_trainers; 
     6683 
    66826684    QueryResult *result = WorldDatabase.PQuery("SELECT entry, spell,spellcost,reqskill,reqskillvalue,reqlevel FROM npc_trainer"); 
    66836685 
     
    67156717        if(!(cInfo->npcflag & UNIT_NPC_FLAG_TRAINER)) 
    67166718        { 
    6717             sLog.outErrorDb("Table `npc_trainer` have data for not creature template (Entry: %u) without trainer flag, ignore", entry); 
     6719            if(skip_trainers.count(entry) == 0) 
     6720            { 
     6721                sLog.outErrorDb("Table `npc_trainer` have data for not creature template (Entry: %u) without trainer flag, ignore", entry); 
     6722                skip_trainers.insert(entry); 
     6723            } 
    67186724            continue; 
    67196725        } 
     
    67656771    m_mCacheVendorItemMap.clear(); 
    67666772 
     6773    std::set<uint32> skip_vendors; 
     6774 
    67676775    QueryResult *result = WorldDatabase.PQuery("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor"); 
    67686776    if( !result ) 
     
    67916799        uint32 ExtendedCost = fields[4].GetUInt32(); 
    67926800 
    6793         if(!IsVendorItemValid(entry,item_id,maxcount,incrtime,ExtendedCost)) 
     6801        if(!IsVendorItemValid(entry,item_id,maxcount,incrtime,ExtendedCost,NULL,&skip_vendors)) 
    67946802            continue; 
    67956803 
     
    68796887} 
    68806888 
    6881 bool ObjectMgr::IsVendorItemValid( uint32 vendor_entry, uint32 item_id, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* pl ) const 
     6889bool ObjectMgr::IsVendorItemValid( uint32 vendor_entry, uint32 item_id, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* pl, std::set<uint32>* skip_vendors ) const 
    68826890{ 
    68836891    CreatureInfo const* cInfo = GetCreatureTemplate(vendor_entry); 
     
    68936901    if(!(cInfo->npcflag & UNIT_NPC_FLAG_VENDOR)) 
    68946902    { 
    6895         if(pl) 
    6896             ChatHandler(pl).SendSysMessage(LANG_COMMAND_VENDORSELECTION); 
    6897         else 
    6898             sLog.outErrorDb("Table `npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry); 
     6903        if(!skip_vendors || skip_vendors->count(vendor_entry)==0) 
     6904        { 
     6905            if(pl) 
     6906                ChatHandler(pl).SendSysMessage(LANG_COMMAND_VENDORSELECTION); 
     6907            else 
     6908                sLog.outErrorDb("Table `npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry); 
     6909 
     6910            if(skip_vendors) 
     6911                skip_vendors->insert(vendor_entry); 
     6912        } 
    68996913        return false; 
    69006914    }