Add support for NPC-based start of playing moviesequence + clean up indenting on earlier commit

--HG--
branch : trunk
This commit is contained in:
click
2010-05-10 13:27:18 +02:00
parent 5b20d478ff
commit d79f6295aa
3 changed files with 13 additions and 3 deletions

View File

@@ -3726,6 +3726,16 @@ void Map::ScriptsProcess()
break;
}
case SCRIPT_COMMAND_PLAYMOVIE:
{
if (!source)
{
sLog.outError("SCRIPT_COMMAND_PLAYMOVIE call for NULL creature.");
break;
}
player->SendMovieStart(step.script->datalong);
break;
}
default:
sLog.outError("Unknown script command %u called.",step.script->command);
break;

View File

@@ -5199,8 +5199,8 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_spellInfo->Id == 781)
if (!m_caster->isInCombat())
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
if (m_caster->hasUnitState(UNIT_STAT_ROOT))
return SPELL_FAILED_ROOTED;
if (m_caster->hasUnitState(UNIT_STAT_ROOT))
return SPELL_FAILED_ROOTED;
break;
}
default:break;

View File

@@ -440,11 +440,11 @@ enum WorldStates
#define SCRIPT_COMMAND_CALLSCRIPT_TO_UNIT 21 // datalong scriptid, lowguid datalong2, dataint table
#define SCRIPT_COMMAND_KILL 22 // datalong removecorpse
//trinity only
#define SCRIPT_COMMAND_ORIENTATION 30 // o = orientation
#define SCRIPT_COMMAND_EQUIP 31 // datalong = equipment id
#define SCRIPT_COMMAND_MODEL 32 // datalong = model id
#define SCRIPT_COMMAND_PLAYMOVIE 34 // datalong = movie id
/// Storage class for commands issued for delayed execution
struct CliCommandHolder