Quote:
Originally Posted by _Vodka
Much better one:
Define this in character.cs:
Code:
public bool IsBigBoy;
public bool IsBigGirl;
public bool IsSmallBoy;
public bool IsSmallGirl;
Now open GameWorker.cs and find:
Code:
Program.WriteLine(GC.MyChar.Name + " has logged on.");
above that put:
Code:
if (GC.MyChar.Body == 1004)
GC.MyChar.IsBigBoy = true;
if (GC.MyChar.Body == 2002)
GC.MyChar.IsBigGirl = true;
if (GC.MyChar.Body == 1003)
GC.MyChar.IsSmallBoy = true;
if (GC.MyChar.Body == 2001)
GC.MyChar.IsSmallGirl = true;
Now the command:
Code:
if (Cmd[0] == "/gm")
{
switch (Cmd[1])
{
case "on":
{
GC.MyChar.Body = 223;
break;
}
case "off":
{
if (GC.MyChar.IsBigBoy == true)
GC.MyChar.Body = 1004;
if (GC.MyChar.IsSmallBoy == true)
GC.MyChar.Body = 1003;
if (GC.MyChar.IsBigGirl == true)
GC.MyChar.Body = 2002;
if (GC.MyChar.IsSmallGirl == true)
GC.MyChar.Body = 2001;
break;
}
}
}
Now open GameClient.cs and find:
Code:
public void LogOff(bool Remove)
after the try
put:
Code:
if (GC.MyChar.IsBigBoy == true)
GC.MyChar.Body = 1004;
if (GC.MyChar.IsSmallBoy == true)
GC.MyChar.Body = 1003;
if (GC.MyChar.IsBigGirl == true)
GC.MyChar.Body = 2002;
if (GC.MyChar.IsSmallGirl == true)
GC.MyChar.Body = 2001;
else
GC.MyChar.Body = 1003;//If not boy or girl, u will be boy
|
Seems a waste of code to me :S
in client do something like
public bool Transformed = false;
public uint Mesh = w/e is loaded from database.
public uint Transformation = 0;
Then in your spawn packet do something like.
If(GC.MyChar.Transformed)
write your mesh as being transformation
else
write your mesh as mesh
Then in command you can do something to set transformed = true; and transformation = w/e you want.
Hell, write a structure for transformation containing activation time, stats, activated, mesh and timeout. Then you have all the information you could ever want for activating/deactivating it at will.
Note: Reason I suggest this mainly is you NEVER want to mess with your char mesh just incase it gets saved. It will fuck up your meshes/genders. It's far better to use less code and just use a transformation value to spawn characters.