mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 21:49:55 +00:00
[General] Rename mwmp::Attack's refid into refId for consistency
This commit is contained in:
parent
b09e6644a9
commit
9f226253d4
4 changed files with 6 additions and 6 deletions
|
@ -535,7 +535,7 @@ void LocalPlayer::updateAttackState(bool forceUpdate)
|
|||
attack.attacker = guid;
|
||||
attack.type = Attack::MAGIC;
|
||||
attack.pressed = true;
|
||||
attack.refid = spell;
|
||||
attack.refId = spell;
|
||||
}
|
||||
else if (state == MWMechanics::DrawState_Weapon)
|
||||
{
|
||||
|
@ -1185,7 +1185,7 @@ void LocalPlayer::prepareAttack(Attack::TYPE type, bool state)
|
|||
const string &spell = MWBase::Environment::get().getWindowManager()->getSelectedSpell();
|
||||
attack.success = Misc::Rng::roll0to99() < MWMechanics::getSpellSuccessChance(spell, getPlayerPtr());
|
||||
state = true;
|
||||
attack.refid = spell;
|
||||
attack.refId = spell;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -452,7 +452,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
}
|
||||
|
||||
MWMechanics::CreatureStats &stats = pl->getPtr().getClass().getNpcStats(pl->getPtr());
|
||||
stats.getSpells().setSelectedSpell(pl->attack.refid);
|
||||
stats.getSpells().setSelectedSpell(pl->attack.refId);
|
||||
|
||||
MWWorld::Ptr victim;
|
||||
if (pl->attack.target == getLocalPlayer()->guid)
|
||||
|
@ -492,7 +492,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
}
|
||||
else
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "SpellId: %s", pl->attack.refid.c_str());
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "SpellId: %s", pl->attack.refId.c_str());
|
||||
LOG_APPEND(Log::LOG_VERBOSE, " - success: %d", pl->attack.success);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace mwmp
|
|||
MAGIC,
|
||||
THROWABLE
|
||||
};
|
||||
std::string refid; // id of spell (e.g. "fireball")
|
||||
std::string refId; // id of spell (e.g. "fireball")
|
||||
char success;
|
||||
char block;
|
||||
float damage;
|
||||
|
|
|
@ -18,7 +18,7 @@ void PacketPlayerAttack::Packet(RakNet::BitStream *bs, bool send)
|
|||
|
||||
RW(player->attack.attacker, send);
|
||||
RW(player->attack.target, send);
|
||||
RW(player->attack.refid, send);
|
||||
RW(player->attack.refId, send);
|
||||
RW(player->attack.type, send);
|
||||
RW(player->attack.success, send);
|
||||
RW(player->attack.damage, send);
|
||||
|
|
Loading…
Reference in a new issue