PDA

View Full Version : Please Post Snippets Or Diffs


kathgar
08-24-2002, 05:16 AM
...of code you change.. otherwise we have to diff our files which have other modifcations, and find what you changes, THEN merge it..try something like this
/zone/client.cpp(path/file..make sure you include path):4567(line number to start)

pp.aapoints = atoi(sep.arg[1]);
message << "Set your AA Points to: " << pp.aapoints << endl;

makes it much easier on us to merge it

If you are changing the lines of code, also paste the block(s) of corresponding orginal source(from the zip) .. also.. i just made the above example up, don't do it

Shawn319
08-24-2002, 10:03 AM
StarTeam has a built in "Visual Diff" and "Visual Merge" tool we use all the time (on top of using ST for our CVS).. if you want these tools you can download StarTeam at www.starbase.com and get an evaluation key..

On the other hand, i'm sure there are hundreds of other similar tools that do the same job (maybe even better).

Aspirax
08-24-2002, 02:52 PM
Sorry, I do all my programming under Unix.

I can use diff, you need to tell me what kind you want.

kathgar
08-25-2002, 05:00 AM
diff -uBb clean changed > blah
obviously, paste blah

solar
09-10-2002, 12:25 PM
I do all my work with unix stuff, only reason I even boot windows is to run the eq client, so this is a diff, if it's not acceptable i can send the modified files.

This thing won't let me just attach files, so here's an URL:
http://www.heliacal.net/~solar/misc/rogue.patch

Elrach
04-22-2003, 04:08 PM
As I started populating my zones, I realized it was a pain to figure out what models were available in each zone. So here is my first contribution: #fixmob

#fixmob [nextrace|prevrace|gender|nexttexture|prevtexture|n exthelm|prevhelm]

Start with #spawn, then use #fixmob with the different parameters to easily navigate through the different races, gender, textures and head textures (head only seem to work for giants). I'll look to add facial features shortly. Finish it off with #npcspawn and you're close to having a full ingame mob editor.

I just wish there was a way to skip innexistant textures... Anyone got any insight? Error returned by client maybe? Gonna look into this to next.

here is my patch file for client.cpp of EQEmu 0.4.4-DR1.

#patch client.cpp client.patch.


3568a3569,3665
> // WORKPOINT 1
> else if (strcasecmp(sep->arg[0], "#fixmob") == 0) {
> if (!sep->arg[1])
> Message(0,"Usage: #fixmob [nextrace|prevrace|gender|nexttexture|prevtexture| nexthelm|prevhelm]");
> // Series of functions to manipulate spawns.
> else if (strcasecmp(sep->arg[1], "nextrace") == 0) {
> // Set to next race
> if ((target) && admin >= 100) {
> if (target->GetRace() == 329) {
> target->SendIllusionPacket(1);
> Message(0, "Race=1");
> }
> else {
> target->SendIllusionPacket(target->GetRace()+1);
> Message(0, "Race=%i",target->GetRace());
> }
> }
> }
> else if (strcasecmp(sep->arg[1], "prevrace") == 0) {
> // Set to previous race
> if ((target) && admin >= 100) {
> if (target->GetRace() == 1) {
> target->SendIllusionPacket(329);
> Message(0, "Race=%i",329);
> }
> else {
> target->SendIllusionPacket(target->GetRace()-1);
> Message(0, "Race=%i",target->GetRace());
> }
> }
> }
> else if (strcasecmp(sep->arg[1], "gender") == 0) {
> // Cycle through the 3 gender modes
> if ((target) && admin >= 100) {
> if (target->GetGender() == 0) {
> target->SendIllusionPacket(target->GetRace(), 3);
> Message(0, "Gender=%i",3);
> }
> else {
> target->SendIllusionPacket(target->GetRace(), target->GetGender()-1);
> Message(0, "Gender=%i",target->GetGender());
> }
> }
> }
> else if (strcasecmp(sep->arg[1], "nexttexture") == 0) {
> // Set to next texture
> if ((target) && admin >= 100) {
> if (target->GetTexture() == 25) {
> target->SendIllusionPacket(target->GetRace(), target->GetGender(), 1);
> Message(0, "Texture=1");
> }
> else {
> target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture()+1);
> Message(0, "Texture=%i",target->GetTexture());
> }
> }
> }
> else if (strcasecmp(sep->arg[1], "prevtexture") == 0) {
> // Set to previous texture
> if ((target) && admin >= 100) {
> if (target->GetTexture() == 1) {
> target->SendIllusionPacket(target->GetRace(), target->GetGender(), 25);
> Message(0, "Texture=%i",25);
> }
> else {
> target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture()-1);
> Message(0, "Texture=%i",target->GetTexture());
> }
> }
> }
> else if (strcasecmp(sep->arg[1], "nexthelm") == 0) {
> // Set to next helm. Only noticed a difference on giants.
> if ((target) && admin >= 100) {
> if (target->GetHelmTexture() == 25) {
> target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture(), 1);
> Message(0, "HelmTexture=1");
> }
> else {
> target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture(), target->GetHelmTexture()+1);
> Message(0, "HelmTexture=%i",target->GetHelmTexture());
> }
> }
> }
> else if (strcasecmp(sep->arg[1], "prevhelm") == 0) {
> // Set to previous helm. Only noticed a difference on giants.
> if ((target) && admin >= 100) {
> if (target->GetHelmTexture() == 1) {
> target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture(), 25);
> Message(0, "HelmTexture=%i",25);
> }
> else {
> target->SendIllusionPacket(target->GetRace(), target->GetGender(), target->GetTexture(), target->GetHelmTexture()-1);
> Message(0, "HelmTexture=%i",target->GetHelmTexture());
> }
> }
> }
> }
4350a4448
> Message(0, " #fixmob [nextrace|prevrace|gender|nexttexture|prevtexture| nexthelm|prevhelm]");

kathgar
04-22-2003, 08:38 PM
Yes, this is the kind of post we are looking for, but in its own thread. I'll leave the post here though as it is a very good example of exactly what we are looking for when people submit code.

Elrach
04-23-2003, 01:15 AM
Oh, sorry. Figured this was the thread you wanted snippets in. Guess I wasn't myself, Leafs were losing game 7 by 5 goals!
:shock:

Armanthuz
05-12-2003, 05:16 AM
blearg!

kathgar
05-13-2003, 04:43 AM
I will repeat, do NOT post the snippets and diffs here, this is just a general information thread on HOW to submit them, in their OWN THREAD

used_pawn
06-16-2003, 11:35 PM
StarTeam has a built in "Visual Diff" and "Visual Merge" tool we use all the time (on top of using ST for our CVS).. if you want these tools you can download StarTeam at www.starbase.com and get an evaluation key..

On the other hand, i'm sure there are hundreds of other similar tools that do the same job (maybe even better).

I have never been able to get that url to work, always a down page. Any other place I could get something to create diff files?

Trumpcard
06-16-2003, 11:39 PM
Try this one..

http://www.borland.com/features/

used_pawn
06-17-2003, 05:23 PM
thanks! DL'ing it right now =)

used_pawn
06-20-2003, 07:47 AM
bah, not sure WHAT i downloaded, but it had nothing to do with a version anything :evil:

how about a filename to look for?