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

[svn] *** Source Mangos ***
*Load npc_options at server startup, use cached data at creature gossip menu init.
* Also new .reload table command added
*Implement npc_option localization support, also store in DB BoxText/BoxMoney/Coded?
* Use characters.guid instead low guid value from characters.data in charcter enum data prepering for client.
* Fixed crash at .pinfo command use from console.
* Fixed windows ad.exe build
*Creature related code and DB cleanups.
* Rename 2 creature_template fields to more clean names and related code update also.
* Use enum values instead raw values for type_flags, use halper functions instead code repeating.
* Move tamed pet creating code to new function.

** Small code changes to make things compliant with above changes.
** Another rev with big changes so test away.

Original author: KingPin?
Date: 2008-11-05 09:22:56-06:00

Files:
1 modified

Legend:

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

    r157 r168  
    36703670                } 
    36713671 
    3672                 uint32 skill; 
    3673                 if(creature->GetCreatureInfo()->flag1 & 256) 
    3674                     skill = SKILL_HERBALISM;                // special case 
    3675                 else if(creature->GetCreatureInfo()->flag1 & 512) 
    3676                     skill = SKILL_MINING;                   // special case 
    3677                 else 
    3678                     skill = SKILL_SKINNING;                 // normal case 
     3672                uint32 skill = creature->GetCreatureInfo()->GetRequiredLootSkill(); 
    36793673 
    36803674                int32 skillValue = ((Player*)m_caster)->GetSkillValue(skill); 
     
    39683962                        return SPELL_FAILED_HIGHLEVEL; 
    39693963 
    3970                     CreatureInfo const *cinfo = ((Creature*)m_targets.getUnitTarget())->GetCreatureInfo(); 
    3971                     if( cinfo->type != CREATURE_TYPE_BEAST ) 
    3972                         return SPELL_FAILED_BAD_TARGETS; 
    3973  
    39743964                    // use SMSG_PET_TAME_FAILURE? 
    3975                     if( !(cinfo->flag1 & 1) || !(cinfo->family) ) 
     3965                    if (!((Creature*)m_targets.getUnitTarget())->GetCreatureInfo()->isTameable ()) 
    39763966                        return SPELL_FAILED_BAD_TARGETS; 
    39773967