added int32 redlight, greenlight, bluelight into info struct for character sheet spell state colors

This commit is contained in:
Emagi 2025-08-14 17:44:28 -04:00
parent 8d8aa020dd
commit 69f257303d
3 changed files with 38 additions and 0 deletions

View File

@ -320,6 +320,11 @@ void Entity::MapInfoStruct()
get_int8_funcs["pet_movement"] = l::bind(&InfoStruct::get_pet_movement, &info_struct);
get_int8_funcs["pet_behavior"] = l::bind(&InfoStruct::get_pet_behavior, &info_struct);
get_int32_funcs["vision"] = l::bind(&InfoStruct::get_vision, &info_struct);
get_int32_funcs["redlight"] = l::bind(&InfoStruct::get_redlight, &info_struct);
get_int32_funcs["greenlight"] = l::bind(&InfoStruct::get_greenlight, &info_struct);
get_int32_funcs["bluelight"] = l::bind(&InfoStruct::get_bluelight, &info_struct);
get_int8_funcs["breathe_underwater"] = l::bind(&InfoStruct::get_breathe_underwater, &info_struct);
get_string_funcs["biography"] = l::bind(&InfoStruct::get_biography, &info_struct);
get_float_funcs["drunk"] = l::bind(&InfoStruct::get_drunk, &info_struct);
@ -530,6 +535,11 @@ void Entity::MapInfoStruct()
set_int8_funcs["pet_movement"] = l::bind(&InfoStruct::set_pet_movement, &info_struct, l::_1);
set_int8_funcs["pet_behavior"] = l::bind(&InfoStruct::set_pet_behavior, &info_struct, l::_1);
set_int32_funcs["vision"] = l::bind(&InfoStruct::set_vision, &info_struct, l::_1);
set_int32_funcs["redlight"] = l::bind(&InfoStruct::set_redlight, &info_struct, l::_1);
set_int32_funcs["greenlight"] = l::bind(&InfoStruct::set_greenlight, &info_struct, l::_1);
set_int32_funcs["bluelight"] = l::bind(&InfoStruct::set_bluelight, &info_struct, l::_1);
set_int8_funcs["breathe_underwater"] = l::bind(&InfoStruct::set_breathe_underwater, &info_struct, l::_1);
set_string_funcs["biography"] = l::bind(&InfoStruct::set_biography, &info_struct, l::_1);
set_float_funcs["drunk"] = l::bind(&InfoStruct::set_drunk, &info_struct, l::_1);

View File

@ -235,6 +235,11 @@ struct InfoStruct{
pet_movement_ = 0;
pet_behavior_ = 0;
vision_ = 0;
redlight_ = 0;
greenlight_ = 0;
bluelight_ = 0;
breathe_underwater_ = 0;
biography_ = std::string("");
drunk_ = 0;
@ -448,6 +453,11 @@ struct InfoStruct{
pet_movement_ = oldStruct->get_pet_movement();
pet_behavior_ = oldStruct->get_pet_behavior();
vision_ = oldStruct->get_vision();
redlight_ = oldStruct->get_redlight();
greenlight_ = oldStruct->get_greenlight();
bluelight_ = oldStruct->get_bluelight();
breathe_underwater_ = oldStruct->get_breathe_underwater();
biography_ = std::string(oldStruct->get_biography());
drunk_ = oldStruct->get_drunk();
@ -668,6 +678,11 @@ struct InfoStruct{
int8 get_pet_movement() { std::lock_guard<std::mutex> lk(classMutex); return pet_movement_; }
int8 get_pet_behavior() { std::lock_guard<std::mutex> lk(classMutex); return pet_behavior_; }
int32 get_vision() { std::lock_guard<std::mutex> lk(classMutex); return vision_; }
int32 get_redlight() { std::lock_guard<std::mutex> lk(classMutex); return redlight_; }
int32 get_greenlight() { std::lock_guard<std::mutex> lk(classMutex); return greenlight_; }
int32 get_bluelight() { std::lock_guard<std::mutex> lk(classMutex); return bluelight_; }
int8 get_breathe_underwater() { std::lock_guard<std::mutex> lk(classMutex); return breathe_underwater_; }
std::string get_biography() { std::lock_guard<std::mutex> lk(classMutex); return biography_; }
float get_drunk() { std::lock_guard<std::mutex> lk(classMutex); return drunk_; }
@ -987,6 +1002,11 @@ struct InfoStruct{
void set_max_weight(int32 value) { std::lock_guard<std::mutex> lk(classMutex); max_weight_ = value; }
void set_vision(int32 value) { std::lock_guard<std::mutex> lk(classMutex); vision_ = value; }
void set_redlight(int32 value) { std::lock_guard<std::mutex> lk(classMutex); redlight_ = value; }
void set_greenlight(int32 value) { std::lock_guard<std::mutex> lk(classMutex); greenlight_ = value; }
void set_bluelight(int32 value) { std::lock_guard<std::mutex> lk(classMutex); bluelight_ = value; }
void set_breathe_underwater(int8 value) { std::lock_guard<std::mutex> lk(classMutex); breathe_underwater_ = value; }
void set_drunk(float value) { std::lock_guard<std::mutex> lk(classMutex); drunk_ = value; }
@ -1232,6 +1252,11 @@ private:
int8 pet_behavior_;
int32 vision_;
int32 redlight_;
int32 greenlight_;
int32 bluelight_;
int8 breathe_underwater_;
std::string biography_;
float drunk_;

View File

@ -1085,6 +1085,9 @@ EQ2Packet* PlayerInfo::serialize(int16 version, int16 modifyPos, int32 modifyVal
packet->setDataByName("spell_state_fishvision", 1);
break;
}
packet->setDataByName("spell_prop_redlight", info_struct->get_redlight());
packet->setDataByName("spell_prop_greenlight", info_struct->get_greenlight());
packet->setDataByName("spell_prop_bluelight", info_struct->get_bluelight());
packet->setDataByName("breathe_underwater", info_struct->get_breathe_underwater());
int32 expireTimestamp = 0;