summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-22 02:20:36 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-22 02:20:36 +0300
commitb54c0e944974669c4b5c1eb3f8018547c2179630 (patch)
treec0a08d7727f6aa0a1a9ed75f8ac14ec7a67f7a85
parent1ff17739796e327e30a78b544be9865420d4c807 (diff)
downloadplus-b54c0e944974669c4b5c1eb3f8018547c2179630.tar.gz
plus-b54c0e944974669c4b5c1eb3f8018547c2179630.tar.bz2
plus-b54c0e944974669c4b5c1eb3f8018547c2179630.tar.xz
plus-b54c0e944974669c4b5c1eb3f8018547c2179630.zip
Remove default parameters from effectmanager.
-rw-r--r--src/being/being.cpp13
-rw-r--r--src/effectmanager.cpp4
-rw-r--r--src/effectmanager.h6
-rw-r--r--src/gui/windows/questswindow.cpp5
-rw-r--r--src/net/eathena/beingrecv.cpp4
-rw-r--r--src/net/tmwa/beingrecv.cpp2
6 files changed, 19 insertions, 15 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index ad68a4657..6bb49a0c8 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -828,7 +828,7 @@ void Being::takeDamage(Being *restrict const attacker,
attackId,
level);
if (hitEffectId >= 0)
- effectManager->trigger(hitEffectId, this);
+ effectManager->trigger(hitEffectId, this, 0);
}
}
else
@@ -851,7 +851,7 @@ void Being::takeDamage(Being *restrict const attacker,
level);
}
if (hitEffectId >= 0)
- effectManager->trigger(hitEffectId, this);
+ effectManager->trigger(hitEffectId, this, 0);
}
}
BLOCK_END("Being::takeDamage2")
@@ -4798,7 +4798,7 @@ void Being::setEmote(const uint8_t emotion,
const int effectId = info->effectId;
if (effectId >= 0)
{
- effectManager->trigger(effectId, this);
+ effectManager->trigger(effectId, this, 0);
}
}
}
@@ -4874,7 +4874,9 @@ void Being::addSpecialEffect(const int effect) restrict2
(mSpecialParticle == nullptr) &&
effect != -1)
{
- mSpecialParticle = effectManager->triggerReturn(effect, this);
+ mSpecialParticle = effectManager->triggerReturn(effect,
+ this,
+ 0);
}
}
@@ -5441,7 +5443,8 @@ void Being::addSpiritBalls(const unsigned int balls,
{
Particle *const particle = effectManager->triggerReturn(
effectId,
- this);
+ this,
+ 0);
mSpiritParticles.push_back(particle);
}
}
diff --git a/src/effectmanager.cpp b/src/effectmanager.cpp
index 3f87bfece..956db6009 100644
--- a/src/effectmanager.cpp
+++ b/src/effectmanager.cpp
@@ -219,7 +219,7 @@ void EffectManager::triggerDefault(int effectId,
effectId = defaultEffectId;
if (effectId == -1)
return;
- trigger(effectId, being);
+ trigger(effectId, being, 0);
}
void EffectManager::triggerDefault(int effectId,
@@ -232,7 +232,7 @@ void EffectManager::triggerDefault(int effectId,
effectId = defaultEffectId;
if (effectId == -1)
return;
- trigger(effectId, x, y, endTime);
+ trigger(effectId, x, y, endTime, 0);
}
void EffectManager::logic()
diff --git a/src/effectmanager.h b/src/effectmanager.h
index 5882e6933..5072216d8 100644
--- a/src/effectmanager.h
+++ b/src/effectmanager.h
@@ -58,7 +58,7 @@ class EffectManager final
*/
bool trigger(const int id,
Being *const being,
- const int rotation = 0);
+ const int rotation);
bool triggerDirection(const int id,
Being *const being,
@@ -66,7 +66,7 @@ class EffectManager final
Particle *triggerReturn(const int id,
Being *const being,
- const int rotation = 0);
+ const int rotation);
/**
* Triggers a effect with the id, at
@@ -75,7 +75,7 @@ class EffectManager final
bool trigger(const int id,
const int x, const int y,
const time_t endTime,
- const int rotation = 0);
+ const int rotation);
void triggerDefault(int effectId,
Being *const being,
diff --git a/src/gui/windows/questswindow.cpp b/src/gui/windows/questswindow.cpp
index 80d853778..4e1b58c33 100644
--- a/src/gui/windows/questswindow.cpp
+++ b/src/gui/windows/questswindow.cpp
@@ -291,11 +291,12 @@ void QuestsWindow::rebuild(const bool playSound)
switch (newCompleteStatus)
{
case 0:
- effectManager->trigger(mNewQuestEffectId, localPlayer);
+ effectManager->trigger(mNewQuestEffectId, localPlayer, 0);
break;
case 1:
effectManager->trigger(mCompleteQuestEffectId,
- localPlayer);
+ localPlayer,
+ 0);
break;
default:
break;
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 30c6a932e..618f34f62 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -1447,7 +1447,7 @@ void BeingRecv::processBeingSpecialEffect(Net::MessageIn &msg)
const int effectType = msg.readInt32("effect type");
if (ParticleEngine::enabled)
- effectManager->trigger(effectType, being);
+ effectManager->trigger(effectType, being, 0);
// +++ need dehard code effectType == 3
if (effectType == 3 && being->getType() == ActorType::Player
@@ -1729,7 +1729,7 @@ void BeingRecv::processBeingSelfEffect(Net::MessageIn &msg)
const int effectType = msg.readInt32("effect type");
if (ParticleEngine::enabled)
- effectManager->trigger(effectType, being);
+ effectManager->trigger(effectType, being, 0);
BLOCK_END("BeingRecv::processBeingSelfEffect")
}
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp
index 874c5069f..82baa257c 100644
--- a/src/net/tmwa/beingrecv.cpp
+++ b/src/net/tmwa/beingrecv.cpp
@@ -1371,7 +1371,7 @@ void BeingRecv::processBeingSelfEffect(Net::MessageIn &msg)
const int effectType = msg.readInt32("effect type");
if (ParticleEngine::enabled)
- effectManager->trigger(effectType, being);
+ effectManager->trigger(effectType, being, 0);
// +++ need dehard code effectType == 3
if (effectType == 3 && being->getType() == ActorType::Player