mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-04 00:19:41 +00:00
[Server] Use multiple parameters instead functions for Mark functions
This commit is contained in:
parent
410eb353e8
commit
f2a88e6a37
2 changed files with 15 additions and 41 deletions
|
@ -91,12 +91,9 @@ void Player::Init(LuaState &lua)
|
||||||
"getQuickKeys", &Player::getQuickKeys,
|
"getQuickKeys", &Player::getQuickKeys,
|
||||||
"getWeatherMgr", &Player::getWeatherMgr,
|
"getWeatherMgr", &Player::getWeatherMgr,
|
||||||
|
|
||||||
"getMarkPosition", &Player::getMarkPosition,
|
"getMark", &Player::getMark,
|
||||||
"setMarkPosition", &Player::setMarkPosition,
|
"setMark", &Player::setMark,
|
||||||
"getMarkRotation", &Player::getMarkRotation,
|
|
||||||
"setMarkRotation", &Player::setMarkRotation,
|
|
||||||
"getMarkCell", &Player::getMarkCell,
|
|
||||||
"setMarkCell", &Player::setMarkCell,
|
|
||||||
"getSelectedSpell", &Player::getSelectedSpell,
|
"getSelectedSpell", &Player::getSelectedSpell,
|
||||||
"setSelectedSpell", &Player::setSelectedSpell,
|
"setSelectedSpell", &Player::setSelectedSpell,
|
||||||
|
|
||||||
|
@ -871,44 +868,25 @@ void Player::setScale(float newScale)
|
||||||
packet->Send(true);
|
packet->Send(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<float, float, float> Player::getMarkPosition()
|
void Player::setMark(float x, float y, float z, float xRot, float zRot, const std::string &cellDescription)
|
||||||
{
|
|
||||||
return make_tuple(markPosition.pos[0], markPosition.pos[1], markPosition.pos[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Player::setMarkPosition(float x, float y, float z)
|
|
||||||
{
|
{
|
||||||
markPosition.pos[0] = x;
|
markPosition.pos[0] = x;
|
||||||
markPosition.pos[1] = y;
|
markPosition.pos[1] = y;
|
||||||
markPosition.pos[2] = z;
|
markPosition.pos[2] = z;
|
||||||
|
|
||||||
changedMarkLocation = true;
|
markPosition.rot[0] = xRot;
|
||||||
}
|
markPosition.rot[2] = zRot;
|
||||||
|
|
||||||
std::tuple<float, float> Player::getMarkRotation()
|
|
||||||
{
|
|
||||||
return make_tuple(markPosition.rot[0], markPosition.rot[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Player::setMarkRotation(float x, float z)
|
|
||||||
{
|
|
||||||
markPosition.rot[0] = x;
|
|
||||||
markPosition.rot[2] = z;
|
|
||||||
|
|
||||||
changedMarkLocation = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string Player::getMarkCell()
|
|
||||||
{
|
|
||||||
return markCell.getDescription();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Player::setMarkCell(const std::string &cellDescription)
|
|
||||||
{
|
|
||||||
markCell = Utils::getCellFromDescription(cellDescription);
|
markCell = Utils::getCellFromDescription(cellDescription);
|
||||||
|
|
||||||
changedMarkLocation = true;
|
changedMarkLocation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::tuple<float, float, float, float, float, std::string> Player::getMark()
|
||||||
|
{
|
||||||
|
return make_tuple(markPosition.pos[0], markPosition.pos[1], markPosition.pos[2],
|
||||||
|
markPosition.rot[0], markPosition.rot[2], markCell.getDescription());
|
||||||
|
}
|
||||||
|
|
||||||
std::string Player::getSelectedSpell()
|
std::string Player::getSelectedSpell()
|
||||||
{
|
{
|
||||||
return selectedSpellId;
|
return selectedSpellId;
|
||||||
|
|
|
@ -178,12 +178,8 @@ public:
|
||||||
int getSkillIncrease(unsigned short attributeId) const;
|
int getSkillIncrease(unsigned short attributeId) const;
|
||||||
void setSkillIncrease(unsigned short attributeId, int increase);
|
void setSkillIncrease(unsigned short attributeId, int increase);
|
||||||
|
|
||||||
std::tuple<float, float, float> getMarkPosition();
|
void setMark(float x, float y, float z, float xRot, float zRot, const std::string &cellDescription);
|
||||||
void setMarkPosition(float x, float y, float z);
|
std::tuple<float, float, float, float, float, std::string> getMark();
|
||||||
std::tuple<float, float> getMarkRotation();
|
|
||||||
void setMarkRotation(float x, float z);
|
|
||||||
std::string getMarkCell();
|
|
||||||
void setMarkCell(const std::string &cellDescription);
|
|
||||||
|
|
||||||
std::string getSelectedSpell();
|
std::string getSelectedSpell();
|
||||||
void setSelectedSpell(const std::string &newSelectedSpellId);
|
void setSelectedSpell(const std::string &newSelectedSpellId);
|
||||||
|
|
Loading…
Reference in a new issue