Crossfire Resources Editor
CREScriptEngine.cpp
Go to the documentation of this file.
1
/*
2
* Crossfire -- cooperative multi-player graphical RPG and adventure game
3
*
4
* Copyright (c) 2022 the Crossfire Development Team
5
*
6
* Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7
* welcome to redistribute it under certain conditions. For details, please
8
* see COPYING and LICENSE.
9
*
10
* The authors can be reached via e-mail at <crossfire@metalforge.org>.
11
*/
12
13
#include "
CREScriptEngine.h
"
14
15
#include "global.h"
16
#include "attack.h"
17
18
CREScriptEngine::CREScriptEngine
()
19
{
20
QScriptValue attacks = newObject();
21
22
for
(
int
attack = 0; attack < NROFATTACKS; attack++)
23
{
24
QString name(attacktype_desc[attack]);
25
name = name.replace(
' '
,
'_'
);
26
attacks.setProperty(name, 1 << attack);
27
}
28
29
globalObject().setProperty(
"AttackType"
, attacks, QScriptValue::ReadOnly | QScriptValue::Undeletable);
30
}
31
32
CREScriptEngine::~CREScriptEngine
()
33
{
34
}
CREScriptEngine::CREScriptEngine
CREScriptEngine()
Definition:
CREScriptEngine.cpp:18
CREScriptEngine::~CREScriptEngine
virtual ~CREScriptEngine()
Definition:
CREScriptEngine.cpp:32
CREScriptEngine.h
crossfire-crossfire-server
utils
cre
CREScriptEngine.cpp
Generated on Mon Sep 1 2025 00:41:07 for Crossfire Resources Editor by
1.8.17