Pol  Revision:cb584c9
chrcast.cpp
Go to the documentation of this file.
1 
8 #include <stddef.h>
9 
10 #include "../../clib/passert.h"
11 #include "../polclock.h"
12 #include "../spells.h"
13 #include "charactr.h"
14 
15 
16 namespace Pol
17 {
18 namespace Mobile
19 {
21 {
22  return start_script( prog, true, new Bscript::BLong( spell->spell_id() ) );
23 }
24 
26 {
27  passert( spell_task == nullptr );
29  // polclock() + spell->delay() * POLCLOCKS_PER_SEC / 1000,
30  Core::polclock(), this, spell, true );
31 }
32 }
33 }
bool start_spell_script(Bscript::EScriptProgram *prog, Core::USpell *spell)
Definition: chrcast.cpp:20
polclock_t polclock()
Definition: polclock.cpp:72
unsigned short spell_id() const
Definition: spells.h:141
#define passert(exp)
Definition: passert.h:62
void schedule_spell(Core::USpell *)
Definition: chrcast.cpp:25
bool start_script(Bscript::EScriptProgram *prog, bool start_attached, Bscript::BObjectImp *param2=nullptr, Bscript::BObjectImp *param3=nullptr, Bscript::BObjectImp *param4=nullptr)
Definition: chrituse.cpp:30
Core::OneShotTask * spell_task
Definition: charactr.h:868
Definition: berror.cpp:12